Rewrite StoreId::storified()
This commit is contained in:
parent
1af3ab018b
commit
1de09f1606
1 changed files with 3 additions and 10 deletions
|
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue