diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 9d174e24..7d4febdc 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -57,7 +57,7 @@ impl StoreEntry { fn new(id: StoreId) -> StoreEntry { StoreEntry { id: id.clone(), - file: LazyFile::Absent(id), + file: LazyFile::Absent(id.into()), status: StoreEntryStatus::Present, } } @@ -241,7 +241,7 @@ impl Store { let mut new_id = self.location.clone(); new_id.push(id); debug!("Created: '{:?}'", new_id); - new_id + StoreId::from(new_id) } /// Creates the Entry at the given location (inside the entry) diff --git a/libimagstore/src/storeid.rs b/libimagstore/src/storeid.rs index 87f432e7..d2b0dc25 100644 --- a/libimagstore/src/storeid.rs +++ b/libimagstore/src/storeid.rs @@ -64,7 +64,7 @@ pub trait IntoStoreId { impl IntoStoreId for PathBuf { fn into_storeid(self) -> StoreId { - self + StoreId(self) } } @@ -163,7 +163,7 @@ impl Iterator for StoreIdIterator { type Item = StoreId; fn next(&mut self) -> Option { - self.paths.next().and_then(|o| o.ok()) + self.paths.next().and_then(|o| o.ok()).map(|p| StoreId::from(p)) } }