From fedb75ec988062f23fb9d686980661bbf8d76028 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 26 Aug 2016 12:18:00 +0200 Subject: [PATCH] Impl IntoStoreId for PathBuf, using StoreId::new_baseless() --- libimagstore/src/storeid.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libimagstore/src/storeid.rs b/libimagstore/src/storeid.rs index f083a65c..a22cbf6d 100644 --- a/libimagstore/src/storeid.rs +++ b/libimagstore/src/storeid.rs @@ -121,6 +121,12 @@ impl IntoStoreId for StoreId { } } +impl IntoStoreId for PathBuf { + fn into_storeid(self) -> Result { + StoreId::new_baseless(self) + } +} + #[macro_export] macro_rules! module_entry_path_mod { ($name:expr, $version:expr) => (