diff options
author | Christian Duerr <contact@christianduerr.com> | 2018-05-11 20:22:36 +0200 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2018-05-11 16:54:19 -0700 |
commit | e34dccdabf210612666cbb9d22d7afff23487eaf (patch) | |
tree | 01cfc895cf42fc3f31427cc4543ab62265af3eb8 /src/main.rs | |
parent | 57281363503ddd1ebb373ed5de2b84c79d5aa3aa (diff) | |
download | alacritty-e34dccdabf210612666cbb9d22d7afff23487eaf.tar.gz alacritty-e34dccdabf210612666cbb9d22d7afff23487eaf.zip |
Fix clippy lints
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs index 4b24b1a5..c45dfda5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,9 +94,9 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> { logging::initialize(options)?; info!("Welcome to Alacritty."); - config.path().map(|config_path| { + if let Some(config_path) = config.path() { info!("Configuration loaded from {}", config_path.display()); - }); + }; // Create a display. // @@ -179,15 +179,16 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> { let mut terminal = processor.process_events(&terminal, display.window()); // Handle config reloads - config_monitor.as_ref() + if let Some(new_config) = config_monitor + .as_ref() .and_then(|monitor| monitor.pending_config()) - .map(|new_config| { - config = new_config; - display.update_config(&config); - processor.update_config(&config); - terminal.update_config(&config); - terminal.dirty = true; - }); + { + config = new_config; + display.update_config(&config); + processor.update_config(&config); + terminal.update_config(&config); + terminal.dirty = true; + } // Maybe draw the terminal if terminal.needs_draw() { |