Merge pull request #590 from Limeth/master

Fix lifetimes in `Layout::children`
This commit is contained in:
Héctor Ramón 2020-11-02 17:57:56 +01:00 committed by GitHub
commit e6131783e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ impl<'a> Layout<'a> {
///
/// [`Layout`]: struct.Layout.html
/// [`Node`]: struct.Node.html
pub fn children(&'a 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),