Apply more suggestions.

This commit is contained in:
Tom Alexander
2023-10-16 18:54:41 -04:00
parent 3069711447
commit 880b00ef3f
7 changed files with 66 additions and 92 deletions

View File

@@ -50,7 +50,7 @@ impl<'a, T> Iterator for Iter<'a, T> {
fn next(&mut self) -> Option<Self::Item> {
let ret = self.next.map(|link| link.get_data());
self.next = self.next.map(|link| link.get_parent()).flatten();
self.next = self.next.and_then(|link| link.get_parent());
ret
}
}