From b6437a0b0f58436b15e54da226ca1a2f20eab941 Mon Sep 17 00:00:00 2001 From: Kai Sickeler Date: Wed, 27 Jul 2016 19:26:45 +0200 Subject: [PATCH] Implement Debug for FileLockEntry, do not derive it --- libimagstore/src/store.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 8e63329f..06abf576 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -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;