mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-18 07:56:06 +00:00
Prepare to simplify
This commit is contained in:
parent
529068cec5
commit
f444996598
@ -23,7 +23,7 @@ impl OperationView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn select_last(&mut self) {
|
pub fn select_last(&mut self) {
|
||||||
let last_index = self.operations().len().saturating_sub(1);
|
let last_index = self.last_index();
|
||||||
self.selected = Some(last_index);
|
self.selected = Some(last_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,4 +49,8 @@ impl OperationView {
|
|||||||
.nth(selected)
|
.nth(selected)
|
||||||
.map(|(op, _)| op)
|
.map(|(op, _)| op)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn last_index(&self) -> usize {
|
||||||
|
self.operations().len().saturating_sub(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user