We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29ebc1e commit 8c031caCopy full SHA for 8c031ca
src/librustdoc/doctree.rs
@@ -79,8 +79,7 @@ impl Module<'hir> {
79
}
80
81
pub(crate) fn push_mod(&mut self, new_item: Module<'hir>) {
82
- for item_iter in self.mods.iter_mut() {
83
- if item_iter.name == new_item.name {
+ if let Some(shadowed_mod) = self.mods.iter_mut().find(|mod_| mod_.name == new_item.name) {
84
if item_iter.from_glob {
85
debug!("push_mod: {:?} shadowed by {:?}", item_iter.name, new_item.name);
86
*item_iter = new_item;
0 commit comments