Make column and row take an IntoIterator
This commit is contained in:
parent
e710e76949
commit
67277fbf93
3 changed files with 8 additions and 10 deletions
|
|
@ -39,11 +39,9 @@ where
|
|||
|
||||
/// Creates a [`Row`] with the given elements.
|
||||
pub fn with_children(
|
||||
children: impl Iterator<Item = Element<'a, Message, Renderer>>,
|
||||
children: impl IntoIterator<Item = Element<'a, Message, Renderer>>,
|
||||
) -> Self {
|
||||
children
|
||||
.into_iter()
|
||||
.fold(Self::new(), |column, element| column.push(element))
|
||||
children.into_iter().fold(Self::new(), Self::push)
|
||||
}
|
||||
|
||||
/// Sets the horizontal spacing _between_ elements.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue