From d4a5ae81c5206a06ff2167f92731c0a911707076 Mon Sep 17 00:00:00 2001 From: edef Date: Sun, 22 Aug 2021 14:38:50 +0000 Subject: ripple/fossil: prefer anonymous type parameters This is mostly a stylistic distinction, but it helps with readability. Change-Id: Ia6b3dca53638f12bcfd498b5f36e7abf16fd061a --- ripple/fossil/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ripple/fossil/src') diff --git a/ripple/fossil/src/lib.rs b/ripple/fossil/src/lib.rs index 6fb5269..c7957ba 100644 --- a/ripple/fossil/src/lib.rs +++ b/ripple/fossil/src/lib.rs @@ -19,12 +19,12 @@ pub struct Store { } impl Store { - pub fn open>(path: P) -> io::Result { + pub fn open(path: impl AsRef) -> io::Result { let db = sled::open(path)?; Ok(Store { db }) } - pub fn add_path>(&self, path: P) -> Node { + pub fn add_path(&self, path: impl AsRef) -> Node { let path = path.as_ref(); let meta = fs::symlink_metadata(path).unwrap(); -- cgit 1.4.1