fix
This commit is contained in:
parent
8887eb07c1
commit
340f014365
1 changed files with 7 additions and 7 deletions
|
@ -68,19 +68,19 @@ impl DivWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn push_for<
|
pub fn push_for_each<
|
||||||
'a,
|
|
||||||
T: UIWidget + 'static,
|
T: UIWidget + 'static,
|
||||||
X: 'a,
|
X,
|
||||||
U: Fn(&X) -> T,
|
U: Fn(&X) -> T,
|
||||||
I: IntoIterator<Item = &'a X>,
|
I: Iterator<Item = X>,
|
||||||
|
O: Into<I>,
|
||||||
>(
|
>(
|
||||||
mut self,
|
mut self,
|
||||||
iterator: I,
|
iterator: O,
|
||||||
then: U,
|
then: U,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
for val in iterator {
|
for val in iterator.into() {
|
||||||
self.0.push(Box::new(then(val)));
|
self.0.push(Box::new(then(&val)));
|
||||||
}
|
}
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue