avoid a rustc bug

context: https://github.com/rust-lang/rust/pull/98835
pull/231/head
Ali MJ Al-Nasrawy 2022-07-29 23:10:50 +03:00 committed by Matěj Laitl
parent 144c2f654e
commit df3b4ae78f
1 changed files with 2 additions and 2 deletions

View File

@ -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
.iter()
.filter(move |c| c.parent == Some(self.contents.id))
.map(move |c| Self {
.map(move |c| CidrTree {
cidrs: self.cidrs,
contents: c,
})