From b2a7b29bb9e195e75ad04dc69c572d02f98fe5ce Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sun, 23 Feb 2020 13:02:00 +0300 Subject: Style fixes --- crates/ra_ide/src/inlay_hints.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index fb63fd1de..a484dfdeb 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs @@ -113,12 +113,13 @@ fn get_param_name_hints( .collect::>(); let fn_signature = get_fn_signature(db, analyzer, &expr)?; - let parameters = + let n_params_to_skip = if fn_signature.has_self_param && fn_signature.parameter_names.len() > args.len() { - fn_signature.parameter_names.iter().skip(1) + 1 } else { - fn_signature.parameter_names.iter().skip(0) + 0 }; + let parameters = fn_signature.parameter_names.iter().skip(n_params_to_skip); let hints = parameters .zip(args) -- cgit v1.2.3