mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
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.
This commit is contained in:
parent
6cde0b1aa0
commit
bf9b4578bb
8 changed files with 22 additions and 23 deletions
|
@ -83,9 +83,9 @@ impl Crate {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn root_module(self, db: &dyn HirDatabase) -> Option<Module> {
|
||||
pub fn root_module(self, db: &dyn HirDatabase) -> Module {
|
||||
let module_id = db.crate_def_map(self.id).root;
|
||||
Some(Module::new(self, module_id))
|
||||
Module::new(self, module_id)
|
||||
}
|
||||
|
||||
pub fn root_file(self, db: &dyn HirDatabase) -> FileId {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue