mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Remove non-needed clones
I am not certain if this will improve performance, but it seems having a .clone() without any need should be removed. This was done with clippy, and manually reviewed: ``` cargo clippy --fix -- -A clippy::all -D clippy::redundant_clone ```
This commit is contained in:
parent
a06525517b
commit
1d59c7b667
21 changed files with 25 additions and 33 deletions
|
@ -131,7 +131,7 @@ pub(crate) fn render_field(
|
|||
item.detail(ty.display(ctx.db()).to_string())
|
||||
.set_documentation(field.docs(ctx.db()))
|
||||
.set_deprecated(is_deprecated)
|
||||
.lookup_by(name.clone());
|
||||
.lookup_by(name);
|
||||
item.insert_text(field_with_receiver(receiver.as_ref(), &escaped_name));
|
||||
if let Some(receiver) = &dot_access.receiver {
|
||||
if let Some(original) = ctx.completion.sema.original_ast_node(receiver.clone()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue