diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-08-25 19:02:37 +0800 |
---|---|---|
committer | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2023-08-25 19:02:37 +0800 |
commit | ffbf0cd8aa73ed3db3e9dc01f154eacb5fe1130c (patch) | |
tree | 7e20ef11e08466f09044d6423319779d1d70919b /src/main.rs | |
parent | c780c06807fbed4388eb5636c30a4cc11eeb814c (diff) |
Migrate from `failure` to `anyhow`+`thiserror`
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index ee197aa..8d88ec1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -77,7 +77,7 @@ fn main() { } } -fn try_main() -> Result<(), failure::Error> { +fn try_main() -> anyhow::Result<()> { use os::get_input; let opts = Opt::from_args(); let os_input = get_input(&opts.interface, !opts.no_resolve, &opts.dns_server)?; @@ -94,7 +94,7 @@ fn try_main() -> Result<(), failure::Error> { let terminal_backend = CrosstermBackend::new(stdout); start(terminal_backend, os_input, opts); } - Err(_) => failure::bail!( + Err(_) => anyhow::bail!( "Failed to get stdout: if you are trying to pipe 'bandwhich' you should use the --raw flag" ), } |