fmt and clippy

This commit is contained in:
lkoester
2024-04-24 16:45:38 +02:00
parent 83322ae415
commit 6f3e14af3b
5 changed files with 86 additions and 57 deletions

View File

@ -42,12 +42,16 @@ pub enum GroupId {
lazy_static! {
pub static ref HOME_PATH: PathBuf = {
let mut home_path = PathBuf::new();
let home_path_default = homedir::get_my_home().expect("Getting home dir from OS failed.").expect("No home dir found.");
let home_path_default = homedir::get_my_home()
.expect("Getting home dir from OS failed.")
.expect("No home dir found.");
home_path.push(if Path::new(HOME_FOLDER_EXPERIMENT).exists() {
HOME_FOLDER_EXPERIMENT
} else {
home_path_default.to_str().expect("Error converting to string.")
home_path_default
.to_str()
.expect("Error converting to string.")
});
home_path
};