aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_ide/src/inlay_hints.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs
index 79c6ff4e1..b391f903a 100644
--- a/crates/ra_ide/src/inlay_hints.rs
+++ b/crates/ra_ide/src/inlay_hints.rs
@@ -263,14 +263,13 @@ fn is_argument_similar_to_param_name(
263) -> bool { 263) -> bool {
264 if is_enum_name_similar_to_param_name(sema, argument, param_name) { 264 if is_enum_name_similar_to_param_name(sema, argument, param_name) {
265 return true; 265 return true;
266 } else { 266 }
267 let argument_string = if let Some(repr) = get_string_representation(argument) { 267 match get_string_representation(argument) {
268 repr 268 None => false,
269 } else { 269 Some(repr) => {
270 return false; 270 let argument_string = repr.trim_start_matches('_');
271 }; 271 argument_string.starts_with(param_name) || argument_string.ends_with(param_name)
272 let argument_string = argument_string.trim_start_matches('_'); 272 }
273 argument_string.starts_with(param_name) || argument_string.ends_with(param_name)
274 } 273 }
275} 274}
276 275