diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-05-12 21:59:21 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-05-12 22:14:20 +0200 |
commit | 68d9fb8e9a88489e66cb0678900186ee71afcee6 (patch) | |
tree | d67757d36b1de0e3334c240186a960531759c2af /src/main.rs | |
parent | ccef8f81f3905f5545db97b9bd720570e3381289 (diff) |
Switch to anyhow
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 0eeb683..a3588f3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,8 +18,9 @@ extern crate handlebars; extern crate web_view; extern crate actix_rt; extern crate actix_web; +extern crate failure; -#[macro_use] extern crate failure; +#[macro_use] extern crate anyhow; #[macro_use] extern crate is_match; #[macro_use] extern crate serde_derive; #[macro_use] extern crate log; @@ -75,7 +76,7 @@ fn main() -> Result<()> { let config: Configuration = { let configfile = xdg::BaseDirectories::with_prefix("distrox")? .find_config_file(&config_file_name) - .ok_or_else(|| err_msg("No configuration found"))?; + .ok_or_else(|| anyhow!("No configuration found"))?; let configstr = ::std::fs::read_to_string(&configfile)?; ::toml::from_str(&configstr)? |