aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-24 16:06:58 +0000
committerGitHub <[email protected]>2019-11-24 16:06:58 +0000
commitac9ba5eb32073c16608acaa04324e7dc46d303d6 (patch)
treea88c9a76a24787c1eac988f318e938406a288677 /crates/ra_hir/src/code_model.rs
parentb0581c2403f49c68738c039065fa2cfc41345738 (diff)
parent434f108adad75b7c5e25db745a9f9fefa5cdaa31 (diff)
Merge #2387
2387: Simplify r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r--crates/ra_hir/src/code_model.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index b3e2ff1c2..9f06b147c 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -62,7 +62,7 @@ impl Crate {
62 } 62 }
63 63
64 pub fn root_module(self, db: &impl DefDatabase) -> Option<Module> { 64 pub fn root_module(self, db: &impl DefDatabase) -> Option<Module> {
65 let module_id = db.crate_def_map(self.crate_id).root(); 65 let module_id = db.crate_def_map(self.crate_id).root;
66 Some(Module::new(self, module_id)) 66 Some(Module::new(self, module_id))
67 } 67 }
68 68
@@ -195,7 +195,7 @@ impl Module {
195 /// in the module tree of any target in `Cargo.toml`. 195 /// in the module tree of any target in `Cargo.toml`.
196 pub fn crate_root(self, db: &impl DefDatabase) -> Module { 196 pub fn crate_root(self, db: &impl DefDatabase) -> Module {
197 let def_map = db.crate_def_map(self.id.krate); 197 let def_map = db.crate_def_map(self.id.krate);
198 self.with_module_id(def_map.root()) 198 self.with_module_id(def_map.root)
199 } 199 }
200 200
201 /// Finds a child module with the specified name. 201 /// Finds a child module with the specified name.