From 1de09f16066de957a470b5452b1f5e435bb3c08f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 22 Aug 2016 12:03:31 +0200 Subject: [PATCH] Rewrite StoreId::storified() --- libimagstore/src/storeid.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/libimagstore/src/storeid.rs b/libimagstore/src/storeid.rs index 2449908e..bc9217d8 100644 --- a/libimagstore/src/storeid.rs +++ b/libimagstore/src/storeid.rs @@ -26,16 +26,9 @@ impl StoreId { } pub fn storified(self, store: &Store) -> StoreId { - if self.starts_with(store.path()) { - debug!("Not storifying {:?}, because it is already.", self); - self - } else { - debug!("Create new store id out of: {:?} and {:?}", store.path(), self.id); - - let new_id = StoreId { base: Some(store.path().clone()), self.id }; - - debug!("Created: '{:?}'", new_id); - new_id + StoreId { + base: Some(store.path().clone()), + id: self.id } }