Implement Debug for FileLockEntry, do not derive it

This commit is contained in:
Kai Sickeler 2016-07-27 19:26:45 +02:00
parent 4cbd81ed20
commit b6437a0b0f

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;