diff options
author | Jonas Schievink <[email protected]> | 2020-06-05 13:24:51 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-06-05 13:24:51 +0100 |
commit | bc2d1729957a25bf5ee8e2213d07460e22c76def (patch) | |
tree | b01fa823a742f647ac41c242d140633dc2691693 | |
parent | 2fb3d87bf77826f213d2876c921308e9f168ca63 (diff) |
Clarify when we visit modules multiple times
-rw-r--r-- | crates/ra_hir_def/src/import_map.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/import_map.rs b/crates/ra_hir_def/src/import_map.rs index 70749f380..4284a0a91 100644 --- a/crates/ra_hir_def/src/import_map.rs +++ b/crates/ra_hir_def/src/import_map.rs | |||
@@ -78,7 +78,9 @@ impl ImportMap { | |||
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | // If we've just added a path to a module, descend into it. | 81 | // If we've just added a path to a module, descend into it. We might traverse |
82 | // modules multiple times, but only if the new path to it is shorter than the | ||
83 | // first (else we `continue` above). | ||
82 | if let Some(ModuleDefId::ModuleId(mod_id)) = item.as_module_def_id() { | 84 | if let Some(ModuleDefId::ModuleId(mod_id)) = item.as_module_def_id() { |
83 | worklist.push((mod_id, mk_path())); | 85 | worklist.push((mod_id, mk_path())); |
84 | } | 86 | } |