mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Remove suspicious unwrap
This commit is contained in:
parent
bcff166b3a
commit
6e2c3f610b
7 changed files with 13 additions and 13 deletions
|
@ -2138,8 +2138,8 @@ impl ExternCrateDecl {
|
|||
self.id.module(db.upcast()).into()
|
||||
}
|
||||
|
||||
pub fn resolved_crate(self, db: &dyn HirDatabase) -> Crate {
|
||||
db.extern_crate_decl_data(self.id).crate_id.into()
|
||||
pub fn resolved_crate(self, db: &dyn HirDatabase) -> Option<Crate> {
|
||||
db.extern_crate_decl_data(self.id).crate_id.map(Into::into)
|
||||
}
|
||||
|
||||
pub fn name(self, db: &dyn HirDatabase) -> Name {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue