aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide_api/src/goto_type_definition.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/goto_type_definition.rs b/crates/ra_ide_api/src/goto_type_definition.rs
index 08ef4a86d..e456ec5d6 100644
--- a/crates/ra_ide_api/src/goto_type_definition.rs
+++ b/crates/ra_ide_api/src/goto_type_definition.rs
@@ -30,10 +30,7 @@ pub(crate) fn goto_type_definition(
30 return None; 30 return None;
31 }; 31 };
32 32
33 let adt_def = ty.autoderef(db).find_map(|ty| match ty.as_adt() { 33 let adt_def = ty.autoderef(db).find_map(|ty| ty.as_adt().map(|adt| adt.0))?;
34 Some((adt_def, _)) => Some(adt_def),
35 None => None,
36 })?;
37 34
38 let nav = NavigationTarget::from_adt_def(db, adt_def); 35 let nav = NavigationTarget::from_adt_def(db, adt_def);
39 Some(RangeInfo::new(node.range(), vec![nav])) 36 Some(RangeInfo::new(node.range(), vec![nav]))