tidy: Use `Fail::iter_causes` instead of `e.causes().skip(1)`

The `iter_causes` method does the `skip(1)` for us and `e.causes()` is now
deprecated. Unfortunately, `Fail::iter_causes` is only implemented on the
trait *object*, not a provided method for all implementations of the trait. This
means that calling it is slightly less ergonomic...
master
Nick Fitzgerald 7 years ago
parent b3976bfb5a
commit 73d4adbc12
  1. 2
      src/main.rs

@ -13,7 +13,7 @@ fn main() {
setup_panic!();
if let Err(e) = run() {
eprintln!("{}", e);
for cause in e.causes().skip(1) {
for cause in Fail::iter_causes(&e) {
eprintln!("Caused by: {}", cause);
}
::std::process::exit(1);

Loading…
Cancel
Save