diff options
author | nickelc <constantin.nickel@gmail.com> | 2023-04-26 21:07:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 15:07:35 -0400 |
commit | ce41a39bf6ebd3b7bbac4c73954cf6078ed96fc5 (patch) | |
tree | 964301063730884f4b23280fe72dd9900c3432ae /Cargo.toml | |
parent | 57e7ce5cd55d127bc33822318cd66b3b6a14f6ec (diff) |
Replace deprecated `error_chain` crate with `anyhow` (#1405)
The `error_chain` crate is now deprecated for a long time and `anyhow`
has proven to be a popular replacement for applications.
This also improves the current error messages for panics.
```
PAGER='"less' git show
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: \
Error(Msg("Could not parse pager command."), State { next_error: Some(ParseError), \
backtrace: InternalBacktrace })', src/main.rs:136:88
```
```
PAGER='"less' git show
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Could not parse pager command.
Caused by:
missing closing quote', src/main.rs:125:88
```
Diffstat (limited to 'Cargo.toml')
-rw-r--r-- | Cargo.toml | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -20,6 +20,7 @@ chrono = "0.4.23" chrono-humanize = "0.2.2" ansi_colours = "1.2.1" ansi_term = "0.12.1" +anyhow = "1.0.70" atty = "0.2.14" bitflags = "2.2.1" box_drawing = "0.1.2" @@ -55,10 +56,5 @@ version = "0.28.2" default-features = false features = [] -[dependencies.error-chain] -version = "0.12.4" -default-features = false -features = [] - [profile.test] opt-level = 2 |