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:
Paul Daniel Faria 2020-08-09 18:52:19 -04:00
parent 6cde0b1aa0
commit bf9b4578bb
8 changed files with 22 additions and 23 deletions

View file

@ -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 {