aboutsummaryrefslogtreecommitdiff
path: root/src/handlers/view.rs
diff options
context:
space:
mode:
authorRubén Beltrán del Río <jj@r.bdr.sh>2026-01-17 11:22:22 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-01-17 12:24:45 +0100
commit88d6bf80f5cdbbb90ead197bd41a67eb8c44e50e (patch)
tree401549b24fe8a747ef6739389b1b38f33ef016bb /src/handlers/view.rs
parent17898fbabde35ab346c133114e78614e707c0eca (diff)
Make clippy stricter and fix
Diffstat (limited to 'src/handlers/view.rs')
-rw-r--r--src/handlers/view.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/handlers/view.rs b/src/handlers/view.rs
index 58d44b2..660f7b9 100644
--- a/src/handlers/view.rs
+++ b/src/handlers/view.rs
@@ -27,8 +27,10 @@ pub fn change_orientation(model: &mut AppModel) {
/// Updates the selected stage type from dropdown selection.
pub fn stage_type_selected(model: &mut AppModel, index: usize) {
- if index < model.available_stage_types.len() {
- model.stage_type = model.available_stage_types[index].clone();
+ if index < model.available_stage_types.len()
+ && let Some(stage_type) = model.available_stage_types.get(index)
+ {
+ model.stage_type = stage_type.clone();
model.update_image();
}
}