Rewrite StoreId::storified()

This commit is contained in:
Matthias Beyer 2016-08-22 12:03:31 +02:00
parent 1af3ab018b
commit 1de09f1606

View file

@ -26,16 +26,9 @@ impl StoreId {
} }
pub fn storified(self, store: &Store) -> StoreId { pub fn storified(self, store: &Store) -> StoreId {
if self.starts_with(store.path()) { StoreId {
debug!("Not storifying {:?}, because it is already.", self); base: Some(store.path().clone()),
self id: self.id
} 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
} }
} }