mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
clippy::redudant_borrow
This commit is contained in:
parent
d6737e55fb
commit
c9b4ac5be4
114 changed files with 285 additions and 285 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue