From 0587b99fde4acf4225c024980dbde624ce6821e6 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 20 Jan 2021 15:41:18 +0100 Subject: Make public DefMap fields private --- crates/hir_ty/src/test_db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir_ty/src/test_db.rs') diff --git a/crates/hir_ty/src/test_db.rs b/crates/hir_ty/src/test_db.rs index 646e16bbe..3bbcbc242 100644 --- a/crates/hir_ty/src/test_db.rs +++ b/crates/hir_ty/src/test_db.rs @@ -81,7 +81,7 @@ impl TestDB { pub(crate) fn module_for_file(&self, file_id: FileId) -> ModuleId { for &krate in self.relevant_crates(file_id).iter() { let crate_def_map = self.crate_def_map(krate); - for (local_id, data) in crate_def_map.modules.iter() { + for (local_id, data) in crate_def_map.modules() { if data.origin.file_id() == Some(file_id) { return ModuleId { krate, local_id }; } @@ -95,7 +95,7 @@ impl TestDB { let crate_graph = self.crate_graph(); for krate in crate_graph.iter() { let crate_def_map = self.crate_def_map(krate); - for (module_id, _) in crate_def_map.modules.iter() { + for (module_id, _) in crate_def_map.modules() { let file_id = crate_def_map[module_id].origin.file_id(); files.extend(file_id) } -- cgit v1.2.3