From eee7c55d3489bae4d2122933406611779f52444c Mon Sep 17 00:00:00 2001 From: edwloef Date: Wed, 30 Apr 2025 19:15:28 +0200 Subject: [PATCH] make `Layout::children` return an `ExactSizeIterator` --- core/src/layout.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/layout.rs b/core/src/layout.rs index 9938342f..b04d27dc 100644 --- a/core/src/layout.rs +++ b/core/src/layout.rs @@ -54,7 +54,9 @@ impl<'a> Layout<'a> { } /// Returns an iterator over the children of this [`Layout`]. - pub fn children(self) -> impl DoubleEndedIterator> { + pub fn children( + self, + ) -> impl DoubleEndedIterator> + ExactSizeIterator { self.node.children().iter().map(move |node| { Layout::with_offset( Vector::new(self.position.x, self.position.y),