remove redundant clone()s

This commit is contained in:
Matthias Krüger 2024-03-17 12:50:22 +01:00
parent 5ecace48f6
commit 2a8edaa14d
8 changed files with 17 additions and 17 deletions

View file

@ -177,7 +177,7 @@ pub(super) fn type_constructor<'a, DB: HirDatabase>(
// Note that we need special case for 0 param constructors because of multi cartesian
// product
let variant_exprs: Vec<Expr> = if param_exprs.is_empty() {
vec![Expr::Variant { variant, generics: generics.clone(), params: Vec::new() }]
vec![Expr::Variant { variant, generics, params: Vec::new() }]
} else {
param_exprs
.into_iter()