mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
remove unreachable!()
This commit is contained in:
parent
835173d065
commit
19fbf2c16b
4 changed files with 18 additions and 15 deletions
|
@ -54,7 +54,7 @@ pub(crate) fn reference_definition(
|
|||
) -> ReferenceResult {
|
||||
use self::ReferenceResult::*;
|
||||
|
||||
let name_kind = classify_name_ref(db, file_id, &name_ref).and_then(|d| Some(d.item));
|
||||
let name_kind = classify_name_ref(db, file_id, &name_ref).map(|d| d.item);
|
||||
match name_kind {
|
||||
Some(Macro(mac)) => return Exact(NavigationTarget::from_macro_def(db, mac)),
|
||||
Some(Field(field)) => return Exact(NavigationTarget::from_field(db, field)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue