Merge pull request #586 from asuivelentine/libimagstore/debug

Implement Debug for FileLockEntry, do not derive it
This commit is contained in:
Matthias Beyer 2016-07-28 14:42:55 +02:00 committed by GitHub
commit b2c11384c0
1 changed files with 7 additions and 1 deletions

View File

@ -843,7 +843,6 @@ impl Drop for Store {
}
/// A struct that allows you to borrow an Entry
#[derive(Debug)]
pub struct FileLockEntry<'a> {
store: &'a Store,
entry: Entry,
@ -858,6 +857,13 @@ impl<'a> FileLockEntry<'a, > {
}
}
impl<'a> Debug for FileLockEntry<'a> {
fn fmt(&self, fmt: &mut Formatter) -> RResult<(), FMTError> {
write!(fmt, "FileLockEntry(Store = {})", self.store.location.to_str()
.unwrap_or("Unknown Path"))
}
}
impl<'a> Deref for FileLockEntry<'a> {
type Target = Entry;