Apply more suggestions.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user