From 0ae7b6b387d419c8f1f4d9a8aec02c3fcc8e88e5 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 25 Dec 2017 19:44:29 +0100 Subject: [PATCH] Do not call description() when displaying the error --- lib/core/libimagerror/src/trace.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/libimagerror/src/trace.rs b/lib/core/libimagerror/src/trace.rs index 526654d5..2ec33a6a 100644 --- a/lib/core/libimagerror/src/trace.rs +++ b/lib/core/libimagerror/src/trace.rs @@ -90,7 +90,7 @@ fn print_trace_maxdepth(idx: u64, e: &Error, max: u64) -> Option<&Error> { } else { write!(stderr(), "\n").ok(); } - write!(stderr(), "{}: {}", Red.paint(format!("ERROR[{:>4}]", idx)), e.description()).ok(); + write!(stderr(), "{}: {}", Red.paint(format!("ERROR[{:>4}]", idx)), e).ok(); e.cause() } @@ -100,7 +100,7 @@ fn count_error_causes(e: &Error) -> u64 { } fn print_trace_dbg(idx: u64, e: &Error) { - debug!("{}: {}", Red.blink().paint(format!("ERROR[{:>4}]", idx)), e.description()); + debug!("{}: {}", Red.blink().paint(format!("ERROR[{:>4}]", idx)), e); if e.cause().is_some() { e.cause().map(|c| print_trace_dbg(idx + 1, c)); }