on master help sign in
Run 'cargo fmt'
commitf5c1cb2dff1f82a55d9212e6878867372e87eda4 authorMartin Nordholts <enselic@gmail.com> dateWed 18 Aug 2021, 13:45 (5 years ago) parent5eb93a6
2 files changed+4−7
src/bin/bat/directories.rs+3−3 tests/integration_tests.rs+1−4
src/bin/bat/directories.rs+3−3
@@ -15,11 +15,11 @@ pub struct BatProjectDirs {
1515impl BatProjectDirs {
1616 fn new() -> Option<BatProjectDirs> {
1717 let cache_dir = BatProjectDirs::get_cache_dir()?;
18−
18+
1919 // Checks whether or not $BAT_CONFIG_DIR exists. If it doesn't, set our config dir
2020 // to our system's default configuration home.
21− let config_dir = if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR")
22− .map(PathBuf::from) {
21+ let config_dir =
22+ if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR").map(PathBuf::from) {
2323 config_dir_op
2424 } else {
2525 #[cfg(target_os = "macos")]
tests/integration_tests.rs+1−4
@@ -755,10 +755,7 @@ fn config_location_from_bat_config_dir_variable() {
755755 .arg("--config-file")
756756 .assert()
757757 .success()
758− .stdout(
759− predicate::str::is_match("conf/config\n")
760− .unwrap()
761− );
758+ .stdout(predicate::str::is_match("conf/config\n").unwrap());
762759}
763760
764761#[test]