Prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-12-11 20:37:52 +01:00
parent 23bc714a92
commit 94625ac329

View File

@ -49,12 +49,12 @@ impl OperationView {
} }
pub fn selected(&self) -> Option<Self> { pub fn selected(&self) -> Option<Self> {
let selected = self.selected?; self.selected.and_then(|selected| {
self.operations()
self.operations() .into_iter()
.into_iter() .nth(selected)
.nth(selected) .map(|(op, _)| op)
.map(|(op, _)| op) })
} }
fn last_index(&self) -> usize { fn last_index(&self) -> usize {