[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:
parent
8562065bea
commit
f0a734839d
1 changed files with 4 additions and 4 deletions
|
@ -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(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue