Clippy refactoring

This commit is contained in:
quexeky
2024-10-15 12:43:00 +11:00
parent 816b427781
commit 2efe3049b3
5 changed files with 22 additions and 36 deletions

View File

@ -50,12 +50,13 @@ pub fn setup() -> DatabaseInterface {
apps_base_dir: apps_base_dir.to_str().unwrap().to_string(),
},
};
#[allow(clippy::let_and_return)]
let db = match fs::exists(db_path.clone()).unwrap() {
true => PathDatabase::load_from_path(db_path).expect("Database loading failed"),
false => PathDatabase::create_at_path(db_path, default).unwrap(),
};
return db;
db
}
pub fn is_set_up() -> bool {