aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2019-04-23 20:41:43 +0100
committerkjeremy <[email protected]>2019-04-23 20:44:37 +0100
commita5bf0cdb97d082a024dcd6704795b816d7815b5f (patch)
tree6796ce14bd5d2ee27d529f8d3f733f902b236ecf /crates/ra_ide_api
parent6ba7667f2bf82aa2fbbef3823567fed0819a3fb9 (diff)
Simplify
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/goto_type_definition.rs8
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)]