From 67277fbf93f4c180eff67bdc4c9dcf84a54d3425 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 9 Jan 2024 06:46:49 +0100 Subject: Make `column` and `row` take an `IntoIterator` --- widget/src/row.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'widget/src/row.rs') diff --git a/widget/src/row.rs b/widget/src/row.rs index bcbe9267..90fd2926 100644 --- a/widget/src/row.rs +++ b/widget/src/row.rs @@ -39,11 +39,9 @@ where /// Creates a [`Row`] with the given elements. pub fn with_children( - children: impl Iterator>, + children: impl IntoIterator>, ) -> 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. -- cgit