1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-01-18 20:11:03 +00:00

Run 'cargo fmt'

This commit is contained in:
Martin Nordholts 2021-08-18 13:45:22 +02:00
parent 5eb93a6eae
commit f5c1cb2dff
2 changed files with 4 additions and 7 deletions

View File

@ -15,11 +15,11 @@ pub struct BatProjectDirs {
impl BatProjectDirs { impl BatProjectDirs {
fn new() -> Option<BatProjectDirs> { fn new() -> Option<BatProjectDirs> {
let cache_dir = BatProjectDirs::get_cache_dir()?; let cache_dir = BatProjectDirs::get_cache_dir()?;
// Checks whether or not $BAT_CONFIG_DIR exists. If it doesn't, set our config dir // Checks whether or not $BAT_CONFIG_DIR exists. If it doesn't, set our config dir
// to our system's default configuration home. // to our system's default configuration home.
let config_dir = if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR") let config_dir =
.map(PathBuf::from) { if let Some(config_dir_op) = env::var_os("BAT_CONFIG_DIR").map(PathBuf::from) {
config_dir_op config_dir_op
} else { } else {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]

View File

@ -755,10 +755,7 @@ fn config_location_from_bat_config_dir_variable() {
.arg("--config-file") .arg("--config-file")
.assert() .assert()
.success() .success()
.stdout( .stdout(predicate::str::is_match("conf/config\n").unwrap());
predicate::str::is_match("conf/config\n")
.unwrap()
);
} }
#[test] #[test]