mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +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
|
@ -847,7 +847,7 @@ impl<'db> SemanticsImpl<'db> {
|
|||
}
|
||||
};
|
||||
process_expansion_for_token(&mut stack, file_id, None, token.as_ref())
|
||||
} else if let Some(meta) = ast::Meta::cast(parent.clone()) {
|
||||
} else if let Some(meta) = ast::Meta::cast(parent) {
|
||||
// attribute we failed expansion for earlier, this might be a derive invocation
|
||||
// or derive helper attribute
|
||||
let attr = meta.parent_attr()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue