make Layout::children return an ExactSizeIterator
This commit is contained in:
parent
fb5ac7dcb0
commit
eee7c55d34
1 changed files with 3 additions and 1 deletions
|
|
@ -54,7 +54,9 @@ impl<'a> Layout<'a> {
|
|||
}
|
||||
|
||||
/// Returns an iterator over the children of this [`Layout`].
|
||||
pub fn children(self) -> impl DoubleEndedIterator<Item = Layout<'a>> {
|
||||
pub fn children(
|
||||
self,
|
||||
) -> impl DoubleEndedIterator<Item = Layout<'a>> + ExactSizeIterator {
|
||||
self.node.children().iter().map(move |node| {
|
||||
Layout::with_offset(
|
||||
Vector::new(self.position.x, self.position.y),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue