mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +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
|
@ -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)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue