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:
Yuri Astrakhan 2022-12-23 02:08:08 -05:00
parent a06525517b
commit 1d59c7b667
21 changed files with 25 additions and 33 deletions

View file

@ -118,7 +118,7 @@ impl SourceAnalyzer {
fn expr_id(&self, db: &dyn HirDatabase, expr: &ast::Expr) -> Option<ExprId> {
let src = match expr {
ast::Expr::MacroExpr(expr) => {
self.expand_expr(db, InFile::new(self.file_id, expr.macro_call()?.clone()))?
self.expand_expr(db, InFile::new(self.file_id, expr.macro_call()?))?
}
_ => InFile::new(self.file_id, expr.clone()),
};