Take self by value in Layout::children

This commit is contained in:
Jakub Hlusička 2020-11-02 16:27:28 +01:00
parent 4dc93e8138
commit 1d51025993
No known key found for this signature in database
GPG Key ID: 1FBD447C66706697

View File

@ -64,7 +64,7 @@ impl<'a> Layout<'a> {
///
/// [`Layout`]: struct.Layout.html
/// [`Node`]: struct.Node.html
pub fn children(&self) -> impl Iterator<Item = Layout<'a>> + '_ {
pub fn children(self) -> impl Iterator<Item = Layout<'a>> {
self.node.children().iter().map(move |node| {
Layout::with_offset(
Vector::new(self.position.x, self.position.y),