diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-11-04 00:11:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-04 00:11:51 +0000 |
commit | 0b1754e73f5238a449a07979666a544877be9042 (patch) | |
tree | c0636fcc58264217c9077ac1e2985e1f8b6b7d29 /src/main.rs | |
parent | d2f4972703fc95e20251796665feb00c768862d4 (diff) | |
download | alacritty-0b1754e73f5238a449a07979666a544877be9042.tar.gz alacritty-0b1754e73f5238a449a07979666a544877be9042.zip |
Fix clippy issues
This resolves all existing clippy issues and removes some old `allow`
annotations which aren't neccesary anymore.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/main.rs b/src/main.rs index 57a7ba2e..af21b980 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,7 +89,6 @@ fn main() { /// If a configuration file is given as a command line argument we don't /// generate a default file. If an empty configuration file is given, i.e. /// /dev/null, we load the compiled-in defaults.) -#[cfg(not(windows))] fn load_config(options: &cli::Options) -> Config { let config_path = options.config_path() .or_else(Config::installed_config) @@ -103,27 +102,6 @@ fn load_config(options: &cli::Options) -> Config { Config::default() }) } -#[cfg(windows)] -fn load_config(options: &cli::Options) -> Config { - let config_path = options - .config_path() - .or_else(|| Config::installed_config()) - .unwrap_or_else(|| { - Config::write_defaults() - .unwrap_or_else(|err| die!("Write defaults config failure: {}", err)) - }); - - Config::load_from(&*config_path).unwrap_or_else(|err| match err { - config::Error::NotFound => { - die!("Config file not found after writing: {}", config_path.display()); - } - config::Error::Empty => { - eprintln!("Empty config; Loading defaults"); - Config::default() - } - _ => die!("{}", err), - }) -} /// Run Alacritty /// |