Remove RefStore::get() which was simply a wrapper to Store::get()

This commit is contained in:
Matthias Beyer 2017-10-14 13:08:37 +02:00
parent bdf1848f3f
commit e74745c9fc

View file

@ -43,9 +43,6 @@ pub trait RefStore {
/// Check whether there is a reference to the file at `pb`
fn exists(&self, pb: PathBuf) -> Result<bool>;
/// Try to get `si` as Ref object from the store
fn get<'a>(&'a self, si: StoreId) -> Result<FileLockEntry<'a>>;
/// Get a Ref object from the store by hash.
///
/// Returns None if the hash cannot be found.
@ -111,14 +108,6 @@ impl RefStore for Store {
})
}
/// Try to get `si` as Ref object from the store
fn get<'a>(&'a self, si: StoreId) -> Result<FileLockEntry<'a>> {
match self.get(si)? {
None => return Err(RE::from_kind(REK::RefNotInStore)),
Some(fle) => Ok(fle),
}
}
/// Get a Ref object from the store by hash.
///
/// Returns None if the hash cannot be found.