aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-05-04 08:58:21 +0100
committerKirill Bulatov <[email protected]>2020-05-04 09:04:02 +0100
commit30817de3affd9376eed4ff164c42fe0e00a1ac37 (patch)
tree7866fe32d154d443838c3971475b7af77d9dfae1 /crates
parent66882f1a249983a1b262a219dbcd47a0e2835418 (diff)
Code review fixes
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates')
-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