1
0
mirror of https://github.com/tonarino/innernet.git synced 2025-01-24 05:16:32 +02:00

avoid a rustc bug

context: https://github.com/rust-lang/rust/pull/98835
This commit is contained in:
Ali MJ Al-Nasrawy 2022-07-29 23:10:50 +03:00 committed by Matěj Laitl
parent 144c2f654e
commit df3b4ae78f

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,
})