diff options
author | Paul Daniel Faria <[email protected]> | 2020-08-09 23:52:19 +0100 |
---|---|---|
committer | Paul Daniel Faria <[email protected]> | 2020-08-09 23:52:19 +0100 |
commit | bf9b4578bbe038501ef7c337e22b448de477f61c (patch) | |
tree | dc307ec47e6bfff850ddc5e0079e14f2512c87a9 /crates/ra_hir/src | |
parent | 6cde0b1aa0f6b8623c6b81b2396f4a0345891233 (diff) |
Remove Option<...> from result of Crate::root_module
There doesn't seem to be any need for it, and removing it simplies
several paths of code that depend on it.
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 4 |
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 27cdabea0..44456e49e 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -83,9 +83,9 @@ impl Crate { | |||
83 | .collect() | 83 | .collect() |
84 | } | 84 | } |
85 | 85 | ||
86 | pub fn root_module(self, db: &dyn HirDatabase) -> Option<Module> { | 86 | pub fn root_module(self, db: &dyn HirDatabase) -> Module { |
87 | let module_id = db.crate_def_map(self.id).root; | 87 | let module_id = db.crate_def_map(self.id).root; |
88 | Some(Module::new(self, module_id)) | 88 | Module::new(self, module_id) |
89 | } | 89 | } |
90 | 90 | ||
91 | pub fn root_file(self, db: &dyn HirDatabase) -> FileId { | 91 | pub fn root_file(self, db: &dyn HirDatabase) -> FileId { |