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

@ -257,7 +257,7 @@ pub use prelude::*;
.find(|dep| &dep.name.to_string() == std_crate)?
.krate;
let mut module = std_crate.root_module(db)?;
let mut module = std_crate.root_module(db);
for segment in path {
module = module.children(db).find_map(|child| {
let name = child.name(db)?;