Clippy trivially_copy_pass_by_ref

This commit is contained in:
Jeremy Kolb 2019-07-05 12:02:32 -04:00
parent ec6f71576a
commit 001e34e6e3
11 changed files with 30 additions and 30 deletions

View file

@ -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() {