diff options
Diffstat (limited to 'crates/ra_hir/src/generics.rs')
-rw-r--r-- | crates/ra_hir/src/generics.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index a82205f0b..c72360f44 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs | |||
@@ -58,14 +58,8 @@ impl GenericParams { | |||
58 | 58 | ||
59 | fn fill_params(&mut self, params: &ast::TypeParamList) { | 59 | fn fill_params(&mut self, params: &ast::TypeParamList) { |
60 | for (idx, type_param) in params.type_params().enumerate() { | 60 | for (idx, type_param) in params.type_params().enumerate() { |
61 | let name = type_param | 61 | let name = type_param.name().map(AsName::as_name).unwrap_or_else(Name::missing); |
62 | .name() | 62 | let param = GenericParam { idx: idx as u32, name }; |
63 | .map(AsName::as_name) | ||
64 | .unwrap_or_else(Name::missing); | ||
65 | let param = GenericParam { | ||
66 | idx: idx as u32, | ||
67 | name, | ||
68 | }; | ||
69 | self.params.push(param); | 63 | self.params.push(param); |
70 | } | 64 | } |
71 | } | 65 | } |