From 8fcd2a6c8ce9cb90843fa65c42a5331effb606ed Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 7 Feb 2018 21:20:58 +0100 Subject: [PATCH] Prettify Store debug output implementation --- lib/core/libimagstore/src/store.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs index 1212f076..4fbce2bb 100644 --- a/lib/core/libimagstore/src/store.rs +++ b/lib/core/libimagstore/src/store.rs @@ -751,16 +751,11 @@ impl Store { impl Debug for Store { - /// TODO: Make pretty. fn fmt(&self, fmt: &mut Formatter) -> RResult<(), FMTError> { - write!(fmt, " --- Store ---\n")?; - write!(fmt, "\n")?; - write!(fmt, " - location : {:?}\n", self.location)?; - write!(fmt, "\n")?; - write!(fmt, "Entries:\n")?; - write!(fmt, "{:?}", self.entries)?; - write!(fmt, "\n")?; - Ok(()) + write!(fmt, + r#"Store\n\tlocation = {:?}\n\tentries = {:?}\n"#, + self.location, + self.entries) } }