summaryrefslogtreecommitdiffstats
path: root/lib/core
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-11-06 18:12:58 +0100
committerMatthias Beyer <mail@beyermatthias.de>2018-11-06 18:12:58 +0100
commitd982a657f8425e2f33e2d2e4391b50209b5b50ef (patch)
treeca1251a699c4ed5d1bb6b641ace783d55cad2d24 /lib/core
parent17913ae3fd5422f2be3a77064ac107ceaf0cb10a (diff)
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>
Diffstat (limited to 'lib/core')
-rw-r--r--lib/core/libimagstore/src/store.rs6
1 files 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())
}
}