mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-15 14:36:06 +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)> {
|
pub fn operations(&self) -> Vec<(&Self, bool, usize)> {
|
||||||
iter::once((self.clone(), true, 0))
|
iter::once((self, true, 0))
|
||||||
.chain(
|
.chain(
|
||||||
self.children
|
self.children
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(i, op)| (op.clone(), Some(i) == self.selected, 1)),
|
.map(|(i, op)| (op, Some(i) == self.selected, 1)),
|
||||||
)
|
)
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
@ -58,6 +58,7 @@ impl OperationView {
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.nth(selected)
|
.nth(selected)
|
||||||
.map(|(op, _, _)| op)
|
.map(|(op, _, _)| op)
|
||||||
|
.cloned()
|
||||||
})
|
})
|
||||||
.unwrap_or(self.clone())
|
.unwrap_or(self.clone())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user