style: make clippy compliant

This commit is contained in:
Eric Mark Martin
2019-02-26 02:47:14 -08:00
parent 4d98fe86e2
commit 6003ffc83c

View File

@@ -22,7 +22,7 @@ fn get_zshrc(base_dirs: &BaseDirs) -> Result<String, ()> {
Err(_) => Err(()),
};
zshrc
.unwrap_or(base_dirs.home_dir().join(".zshrc"))
.unwrap_or_else(|_| base_dirs.home_dir().join(".zshrc"))
.to_str()
.map(|s| s.to_owned())
.ok_or(())