diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/goto_type_definition.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/goto_type_definition.rs b/crates/ra_ide_api/src/goto_type_definition.rs index b6a3c1c3a..de2b9d3c3 100644 --- a/crates/ra_ide_api/src/goto_type_definition.rs +++ b/crates/ra_ide_api/src/goto_type_definition.rs | |||
@@ -30,12 +30,10 @@ pub(crate) fn goto_type_definition( | |||
30 | return None; | 30 | return None; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | if let Some((adt_def, _)) = ty.as_adt() { | 33 | let (adt_def, _) = ty.as_adt()?; |
34 | let nav = NavigationTarget::from_adt_def(db, adt_def); | 34 | let nav = NavigationTarget::from_adt_def(db, adt_def); |
35 | return Some(RangeInfo::new(node.range(), vec![nav])); | ||
36 | }; | ||
37 | 35 | ||
38 | None | 36 | Some(RangeInfo::new(node.range(), vec![nav])) |
39 | } | 37 | } |
40 | 38 | ||
41 | #[cfg(test)] | 39 | #[cfg(test)] |