fix clippy suggestions
All checks were successful
/ Quality Check (push) Successful in 3m40s
/ Build (push) Successful in 3m0s

This commit is contained in:
Phani Pavan K
2025-08-30 15:09:28 +05:30
parent d9b06c990e
commit 7ba256c96d
2 changed files with 2 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ impl AppState {
currentlyEditing: None,
screen: CurrentScreen::Main,
entries: settings.entries,
confDir: confDir,
confDir,
}
}

View File

@@ -17,11 +17,7 @@ impl Settings {
pub fn new(config: &String) -> Self {
let data = std::fs::read_to_string(config);
match data {
Ok(data) => {
let settings =
serde_json::from_str::<Settings>(&data).expect("Settings file corrupted");
settings
}
Ok(data) => serde_json::from_str::<Settings>(&data).expect("Settings file corrupted"),
Err(_) => {
let newSet = Settings { entries: vec![] };
let payload = serde_json::to_string_pretty(&newSet).unwrap();