mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-09 03:26:07 +00:00
Relax type of return value
This commit is contained in:
parent
9a2c311d18
commit
c0c5a281fd
@ -24,13 +24,13 @@ impl OperationView {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn operations(&self) -> Vec<(Self, bool, usize)> {
|
||||
iter::once((self.clone(), true, 0))
|
||||
pub fn operations(&self) -> Vec<(&Self, bool, usize)> {
|
||||
iter::once((self, true, 0))
|
||||
.chain(
|
||||
self.children
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, op)| (op.clone(), Some(i) == self.selected, 1)),
|
||||
.map(|(i, op)| (op, Some(i) == self.selected, 1)),
|
||||
)
|
||||
.collect()
|
||||
}
|
||||
@ -58,6 +58,7 @@ impl OperationView {
|
||||
.into_iter()
|
||||
.nth(selected)
|
||||
.map(|(op, _, _)| op)
|
||||
.cloned()
|
||||
})
|
||||
.unwrap_or(self.clone())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user