Rewrite Debug for FileLockEntry

This changes the implementation of Debug for the FileLockEntry to be
more explanatory of how the entry actually looks like. It does not only
print the path of the store anymore, but also the location of the Entry.

Printing header and content would be still too much, tho.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2018-11-06 18:12:58 +01:00
parent 17913ae3fd
commit d982a657f8

View file

@ -680,8 +680,10 @@ 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"))
write!(fmt,
"FileLockEntry(Store = {store}, location = {location:?})",
store = self.store.location.to_str().unwrap_or("Unknown Path"),
location = self.entry.get_location())
}
}