aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/descriptors/module
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/descriptors/module')
-rw-r--r--crates/ra_analysis/src/descriptors/module/mod.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_analysis/src/descriptors/module/mod.rs b/crates/ra_analysis/src/descriptors/module/mod.rs
index 4e871d16d..13bab0087 100644
--- a/crates/ra_analysis/src/descriptors/module/mod.rs
+++ b/crates/ra_analysis/src/descriptors/module/mod.rs
@@ -34,12 +34,8 @@ impl ModuleTree {
34 .collect() 34 .collect()
35 } 35 }
36 36
37 pub(crate) fn modules_for_file(&self, file_id: FileId) -> Vec<ModuleId> { 37 pub(crate) fn any_module_for_source(&self, source: ModuleSource) -> Option<ModuleId> {
38 self.modules_for_source(ModuleSource::File(file_id)) 38 self.modules_for_source(source).pop()
39 }
40
41 pub(crate) fn any_module_for_file(&self, file_id: FileId) -> Option<ModuleId> {
42 self.modules_for_file(file_id).pop()
43 } 39 }
44} 40}
45 41