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:
@ -85,11 +85,10 @@ impl Effect for AddFormula {
|
||||
// For non-_Measure targets, add the item to the category so it
|
||||
// appears in the grid. _Measure targets are dynamically included
|
||||
// via Model::measure_item_names().
|
||||
if formula.target_category != "_Measure" {
|
||||
if let Some(cat) = app.model.category_mut(&formula.target_category) {
|
||||
if formula.target_category != "_Measure"
|
||||
&& let Some(cat) = app.model.category_mut(&formula.target_category) {
|
||||
cat.add_item(&formula.target);
|
||||
}
|
||||
}
|
||||
app.model.add_formula(formula);
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user