File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ lazy_static! {
11
11
static ref SETTINGS : RwLock <Config > = RwLock :: new( Config :: default ( ) ) ;
12
12
}
13
13
14
- fn try_main ( ) -> Result < ( ) , Box < Error > > {
14
+ fn try_main ( ) -> Result < ( ) , Box < dyn Error > > {
15
15
// Set property
16
16
SETTINGS . write ( ) ?. set ( "property" , 42 ) ?;
17
17
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ impl Settings {
46
46
// Add in the current environment file
47
47
// Default to 'development' env
48
48
// 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 ( ) ) ;
50
50
s. merge ( File :: with_name ( & format ! ( "config/{}" , env) ) . required ( false ) ) ?;
51
51
52
52
// Add in a local configuration file
You can’t perform that action at this time.
0 commit comments