From d982a657f8425e2f33e2d2e4391b50209b5b50ef Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 6 Nov 2018 18:12:58 +0100 Subject: [PATCH] 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 --- lib/core/libimagstore/src/store.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs index 8eac76d9..e4bb1a6b 100644 --- a/lib/core/libimagstore/src/store.rs +++ b/lib/core/libimagstore/src/store.rs @@ -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()) } }