Make column and row take an IntoIterator

This commit is contained in:
Héctor Ramón Jiménez 2024-01-09 06:46:49 +01:00
parent e710e76949
commit 67277fbf93
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 8 additions and 10 deletions

View file

@ -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.