Fix IntoStoreId implementation
This commit is contained in:
parent
799b9e27a5
commit
4d4acf9168
2 changed files with 4 additions and 4 deletions
|
@ -57,7 +57,7 @@ impl StoreEntry {
|
||||||
fn new(id: StoreId) -> StoreEntry {
|
fn new(id: StoreId) -> StoreEntry {
|
||||||
StoreEntry {
|
StoreEntry {
|
||||||
id: id.clone(),
|
id: id.clone(),
|
||||||
file: LazyFile::Absent(id),
|
file: LazyFile::Absent(id.into()),
|
||||||
status: StoreEntryStatus::Present,
|
status: StoreEntryStatus::Present,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ impl Store {
|
||||||
let mut new_id = self.location.clone();
|
let mut new_id = self.location.clone();
|
||||||
new_id.push(id);
|
new_id.push(id);
|
||||||
debug!("Created: '{:?}'", new_id);
|
debug!("Created: '{:?}'", new_id);
|
||||||
new_id
|
StoreId::from(new_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates the Entry at the given location (inside the entry)
|
/// Creates the Entry at the given location (inside the entry)
|
||||||
|
|
|
@ -64,7 +64,7 @@ pub trait IntoStoreId {
|
||||||
|
|
||||||
impl IntoStoreId for PathBuf {
|
impl IntoStoreId for PathBuf {
|
||||||
fn into_storeid(self) -> StoreId {
|
fn into_storeid(self) -> StoreId {
|
||||||
self
|
StoreId(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ impl Iterator for StoreIdIterator {
|
||||||
type Item = StoreId;
|
type Item = StoreId;
|
||||||
|
|
||||||
fn next(&mut self) -> Option<StoreId> {
|
fn next(&mut self) -> Option<StoreId> {
|
||||||
self.paths.next().and_then(|o| o.ok())
|
self.paths.next().and_then(|o| o.ok()).map(|p| StoreId::from(p))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue