Skip to content

Commit e84a399

Browse files
committed
Clippy fix for examples
1 parent 57fb261 commit e84a399

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/global/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ lazy_static! {
1111
static ref SETTINGS: RwLock<Config> = RwLock::new(Config::default());
1212
}
1313

14-
fn try_main() -> Result<(), Box<Error>> {
14+
fn try_main() -> Result<(), Box<dyn Error>> {
1515
// Set property
1616
SETTINGS.write()?.set("property", 42)?;
1717

examples/hierarchical-env/src/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Settings {
4646
// Add in the current environment file
4747
// Default to 'development' env
4848
// Note that this file is _optional_
49-
let env = env::var("RUN_MODE").unwrap_or("development".into());
49+
let env = env::var("RUN_MODE").unwrap_or_else(|_| "development".into());
5050
s.merge(File::with_name(&format!("config/{}", env)).required(false))?;
5151

5252
// Add in a local configuration file

0 commit comments

Comments
 (0)