From c9b4ac5be4daaabc062ab1ee663eba8594750003 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:24:16 +0530 Subject: clippy::redudant_borrow --- crates/ide_completion/src/render/pattern.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide_completion/src/render') diff --git a/crates/ide_completion/src/render/pattern.rs b/crates/ide_completion/src/render/pattern.rs index b4e80f424..3717a0409 100644 --- a/crates/ide_completion/src/render/pattern.rs +++ b/crates/ide_completion/src/render/pattern.rs @@ -75,10 +75,10 @@ fn render_pat( ) -> Option { let mut pat = match kind { StructKind::Tuple if ctx.snippet_cap().is_some() => { - render_tuple_as_pat(&fields, &name, fields_omitted) + render_tuple_as_pat(fields, name, fields_omitted) } StructKind::Record => { - render_record_as_pat(ctx.db(), ctx.snippet_cap(), &fields, &name, fields_omitted) + render_record_as_pat(ctx.db(), ctx.snippet_cap(), fields, name, fields_omitted) } _ => return None, }; @@ -86,7 +86,7 @@ fn render_pat( if ctx.completion.is_param { pat.push(':'); pat.push(' '); - pat.push_str(&name); + pat.push_str(name); } if ctx.snippet_cap().is_some() { pat.push_str("$0"); -- cgit v1.2.3