Skip to content

Commit

Permalink
Fix a Rust 1.45 Clippy warning (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
AzureMarker authored Jul 17, 2020
1 parent e73dff1 commit 2d4d08f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoendpoint/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Settings {
// Merge the environment overrides
config.merge(Environment::with_prefix(ENV_PREFIX))?;

config.try_into::<Self>().or_else(|error| match error {
config.try_into::<Self>().map_err(|error| match error {
// Configuration errors are not very sysop friendly, Try to make them
// a bit more 3AM useful.
ConfigError::Message(error_msg) => {
Expand All @@ -71,11 +71,11 @@ impl Settings {
ENV_PREFIX.to_uppercase()
);
error!("Configuration error: Value undefined {:?}", &error_msg);
Err(ConfigError::NotFound(error_msg))
ConfigError::NotFound(error_msg)
}
_ => {
error!("Configuration error: Other: {:?}", &error);
Err(error)
error
}
})
}
Expand Down

0 comments on commit 2d4d08f

Please sign in to comment.