diff options
Diffstat (limited to 'crates/ra_ide/src/display')
-rw-r--r-- | crates/ra_ide/src/display/function_signature.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_ide/src/display/function_signature.rs b/crates/ra_ide/src/display/function_signature.rs index 2d175882b..b5e2785fe 100644 --- a/crates/ra_ide/src/display/function_signature.rs +++ b/crates/ra_ide/src/display/function_signature.rs | |||
@@ -73,7 +73,7 @@ impl FunctionSignature { | |||
73 | if let Some(param_type) = raw_param.split(':').nth(1) { | 73 | if let Some(param_type) = raw_param.split(':').nth(1) { |
74 | parameter_types.push(param_type[1..].to_string()); | 74 | parameter_types.push(param_type[1..].to_string()); |
75 | } else { | 75 | } else { |
76 | // The unwrap_or_else is useful when you have tuple struct | 76 | // useful when you have tuple struct |
77 | parameter_types.push(raw_param.clone()); | 77 | parameter_types.push(raw_param.clone()); |
78 | } | 78 | } |
79 | params.push(raw_param); | 79 | params.push(raw_param); |
@@ -177,7 +177,6 @@ impl From<&'_ ast::FnDef> for FunctionSignature { | |||
177 | has_self_param = true; | 177 | has_self_param = true; |
178 | let raw_param = self_param.syntax().text().to_string(); | 178 | let raw_param = self_param.syntax().text().to_string(); |
179 | 179 | ||
180 | // FIXME: better solution ? | ||
181 | res_types.push( | 180 | res_types.push( |
182 | raw_param.split(':').nth(1).unwrap_or_else(|| " Self")[1..].to_string(), | 181 | raw_param.split(':').nth(1).unwrap_or_else(|| " Self")[1..].to_string(), |
183 | ); | 182 | ); |