From 88a15d10d543c09ef66a9f105c3dcdb5011abbee Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 4 Nov 2018 20:21:20 +0300 Subject: use module_for_source --- crates/ra_analysis/src/descriptors/module/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crates/ra_analysis/src/descriptors/module') 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 { .collect() } - pub(crate) fn modules_for_file(&self, file_id: FileId) -> Vec { - self.modules_for_source(ModuleSource::File(file_id)) - } - - pub(crate) fn any_module_for_file(&self, file_id: FileId) -> Option { - self.modules_for_file(file_id).pop() + pub(crate) fn any_module_for_source(&self, source: ModuleSource) -> Option { + self.modules_for_source(source).pop() } } -- cgit v1.2.3