Replace unwrap() with map()
This commit is contained in:
parent
9ea1811e21
commit
11dc277c6b
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ fn count_error_causes(e: &Error) -> u64 {
|
||||||
fn print_trace_dbg(idx: u64, e: &Error) {
|
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.description());
|
||||||
if e.cause().is_some() {
|
if e.cause().is_some() {
|
||||||
print_trace_dbg(idx + 1, e.cause().unwrap());
|
e.cause().map(|c| print_trace_dbg(idx + 1, c));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue