mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Remove some redundant allocations
This commit is contained in:
parent
479d1f7eec
commit
26a1675764
10 changed files with 9 additions and 10 deletions
|
@ -91,7 +91,7 @@ impl<'a> FunctionRender<'a> {
|
|||
.zip(params_ty)
|
||||
.flat_map(|(pat, param_ty)| {
|
||||
let pat = pat?;
|
||||
let name = pat.to_string();
|
||||
let name = pat;
|
||||
let arg = name.trim_start_matches("mut ").trim_start_matches('_');
|
||||
Some(self.add_arg(arg, param_ty.ty()))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue