Skip to content

Commit e81f408

Browse files
authored
Simplify printing error source (#761)
`anyhow::Error` supports using the `:#` format option to print the error sources as well as the base error. Replace our customer logic to print the source with this.
1 parent a1f5d72 commit e81f408

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cli/src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@ async fn main() {
110110
}
111111
}
112112

113-
let src = e.source().map(|s| format!(": {s}")).unwrap_or_default();
114-
eprintln_nopipe!("{e}{src}");
115-
116-
eprintln_nopipe!("{e}");
113+
eprintln_nopipe!("{e:#}");
117114
std::process::exit(1)
118115
}
119116
}

0 commit comments

Comments
 (0)