parent
144c2f654e
commit
df3b4ae78f
|
@ -259,11 +259,11 @@ impl<'a> CidrTree<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn children(&self) -> impl Iterator<Item = CidrTree> {
|
pub fn children(&self) -> impl Iterator<Item = CidrTree<'_>> {
|
||||||
self.cidrs
|
self.cidrs
|
||||||
.iter()
|
.iter()
|
||||||
.filter(move |c| c.parent == Some(self.contents.id))
|
.filter(move |c| c.parent == Some(self.contents.id))
|
||||||
.map(move |c| Self {
|
.map(move |c| CidrTree {
|
||||||
cidrs: self.cidrs,
|
cidrs: self.cidrs,
|
||||||
contents: c,
|
contents: c,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue