mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Clippy trivially_copy_pass_by_ref
This commit is contained in:
parent
ec6f71576a
commit
001e34e6e3
11 changed files with 30 additions and 30 deletions
|
@ -31,7 +31,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
let body = self.func.body(db);
|
||||
for e in body.exprs() {
|
||||
if let (id, Expr::StructLit { path, fields, spread }) = e {
|
||||
self.validate_struct_literal(id, path, fields, spread, db);
|
||||
self.validate_struct_literal(id, path, fields, *spread, db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
id: ExprId,
|
||||
_path: &Option<Path>,
|
||||
fields: &[StructLitField],
|
||||
spread: &Option<ExprId>,
|
||||
spread: Option<ExprId>,
|
||||
db: &impl HirDatabase,
|
||||
) {
|
||||
if spread.is_some() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue