1
Fork 0

Delete useless loop

This commit is contained in:
Nilstrieb 2023-04-09 22:35:49 +02:00
parent 1c75724752
commit 5a90de8f5e

View file

@ -74,7 +74,7 @@ impl<'hir> Iterator for ParentHirIterator<'hir> {
if self.current_id == CRATE_HIR_ID {
return None;
}
loop {
// There are nodes that do not have entries, so we need to skip them.
let parent_id = self.map.parent_id(self.current_id);
@ -86,7 +86,6 @@ impl<'hir> Iterator for ParentHirIterator<'hir> {
self.current_id = parent_id;
return Some(parent_id);
}
}
}
/// An iterator that walks up the ancestor tree of a given `HirId`.