clippy::redudant_borrow

This commit is contained in:
Maan2003 2021-06-13 09:24:16 +05:30
parent d6737e55fb
commit c9b4ac5be4
No known key found for this signature in database
GPG key ID: E9AF024BA63C70ED
114 changed files with 285 additions and 285 deletions

View file

@ -75,10 +75,10 @@ fn render_pat(
) -> Option<String> {
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");