# HG changeset patch # User Michel Alexandre Salim # Date 1591569729 25200 # Sun Jun 07 15:42:09 2020 -0700 # Node ID 6c94b132e3711163bd0020b10542528fe1ee4da5 # Parent 14b3b90807c180082478db2d56dece4f69f47e49 `cargo fmt` diff --git a/src/main.rs b/src/main.rs --- a/src/main.rs +++ b/src/main.rs @@ -28,12 +28,10 @@ // second priority: in the user's config dir match env::var("XDG_CONFIG_HOME") { Ok(confdir) => paths.push(PathBuf::from(&confdir).join("choosier")), - Err(_) => { - match env::var("HOME") { - Ok(homedir) => paths.push(PathBuf::from(&homedir).join(".config").join("choosier")), - Err(_) => (), - } - } + Err(_) => match env::var("HOME") { + Ok(homedir) => paths.push(PathBuf::from(&homedir).join(".config").join("choosier")), + Err(_) => (), + }, } // third priority: in /etc @@ -45,7 +43,10 @@ return Ok(cfg_path.to_owned()); } } - Err(io::Error::new(io::ErrorKind::NotFound, "configuration file not found")) + Err(io::Error::new( + io::ErrorKind::NotFound, + "configuration file not found", + )) } fn parse(config_str: &str) -> Result { @@ -65,8 +66,6 @@ } } - - fn open_url(url: &str, config: Config) { use std::process::Command; @@ -78,7 +77,7 @@ Some(_) => { pick = browser.to_string(); } - None => () + None => (), } } }