diff options
Diffstat (limited to 'examples/watch/src/main.rs')
-rw-r--r-- | examples/watch/src/main.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/watch/src/main.rs b/examples/watch/src/main.rs index 70fb7ef..0976f74 100644 --- a/examples/watch/src/main.rs +++ b/examples/watch/src/main.rs @@ -12,10 +12,12 @@ use std::sync::mpsc::channel; use std::time::Duration; lazy_static! { - static ref SETTINGS: RwLock<Config> = RwLock::new(Config::default() - .merge(File::with_name("Settings.toml")) - .unwrap() - ); + static ref SETTINGS: RwLock<Config> = RwLock::new({ + let mut settings = Config::default(); + settings.merge(File::with_name("Settings.toml")).unwrap(); + + settings + }); } fn show() { |