From 86e7dde4b7f126ad0a2e6c2e0338b5146caa1ab2 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 16 Jan 2016 14:29:09 +0100 Subject: [PATCH] Derive Debug for StoreError --- libimagstore/src/error.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/libimagstore/src/error.rs b/libimagstore/src/error.rs index bfba5b36..8a2d56d8 100644 --- a/libimagstore/src/error.rs +++ b/libimagstore/src/error.rs @@ -31,6 +31,7 @@ impl Display for StoreErrorKind { } +#[derive(Debug)] pub struct StoreError { err_type: StoreErrorKind, cause: Option>, @@ -53,16 +54,6 @@ impl StoreError { } -impl Debug for StoreError { - - fn fmt(&self, fmt: &mut Formatter) -> Result<(), FmtError> { - try!(write!(fmt, "[{:?}]: caused by: {:?}", - self.err_type, self.cause)); - Ok(()) - } - -} - impl Display for StoreError { fn fmt(&self, fmt: &mut Formatter) -> Result<(), FmtError> {