refactor(all): use let chains to flatten nested if statements
Replace nested if and if let blocks with combined if statements using let chains. This reduces indentation and improves readability across the project. Co-Authored-By: fiddlerwoaroof/git-smart-commit (gemma-4-31B-it-UD-Q4_K_XL.gguf)
This commit is contained in:
+2
-3
@@ -374,13 +374,12 @@ impl App {
|
||||
}
|
||||
|
||||
pub fn autosave_if_needed(&mut self) {
|
||||
if self.dirty && self.last_autosave.elapsed() > Duration::from_secs(30) {
|
||||
if let Some(path) = &self.file_path.clone() {
|
||||
if self.dirty && self.last_autosave.elapsed() > Duration::from_secs(30)
|
||||
&& let Some(path) = &self.file_path.clone() {
|
||||
let ap = persistence::autosave_path(path);
|
||||
let _ = persistence::save(&self.model, &ap);
|
||||
self.last_autosave = Instant::now();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start_import_wizard(&mut self, json: serde_json::Value) {
|
||||
|
||||
Reference in New Issue
Block a user