[Auto] lib/core/error: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:45:10 +02:00 committed by Matthias Beyer
parent 8562065bea
commit f0a734839d

View file

@ -35,19 +35,19 @@ impl<'a, T: 'a + ?Sized> ImagTrace<'a, T> {
impl<'a> Display for ImagTrace<'a, Error> impl<'a> Display for ImagTrace<'a, Error>
{ {
fn fmt(&self, fmt: &mut Formatter) -> FmtResult { fn fmt(&self, fmt: &mut Formatter) -> FmtResult {
let _ = writeln!(fmt, "{}: {}", Red.blink().paint("ERROR[ 0]"), self.0)?; writeln!(fmt, "{}: {}", Red.blink().paint("ERROR[ 0]"), self.0)?;
{ {
for (i, cause) in self.0.iter_causes().enumerate() { for (i, cause) in self.0.iter_causes().enumerate() {
let _ = writeln!(fmt, writeln!(fmt,
"{prefix}: {error}", "{prefix}: {error}",
prefix = Red.blink().paint(format!("ERROR[{:>4}]", i + 1)), prefix = Red.blink().paint(format!("ERROR[{:>4}]", i + 1)),
error = cause)?; error = cause)?;
} }
} }
let _ = writeln!(fmt, "{}", Red.paint("--- BACKTRACE ---"))?; writeln!(fmt, "{}", Red.paint("--- BACKTRACE ---"))?;
let _ = writeln!(fmt, "{:?}", self.0.backtrace())?; writeln!(fmt, "{:?}", self.0.backtrace())?;
Ok(()) Ok(())
} }