diff options
author | kjeremy <[email protected]> | 2020-07-06 22:13:55 +0100 |
---|---|---|
committer | kjeremy <[email protected]> | 2020-07-06 22:13:55 +0100 |
commit | ebdee366b0e16d1d019db2f5c22a730b4451194f (patch) | |
tree | b7a052c076ecf5c7a21824693da85b8f3bc970d8 /crates/ra_hir_ty/src/infer | |
parent | d4bc2f25de6297c75f7b7f029df224b650ef3143 (diff) |
Clippy perf warnings
Removes redundant clones
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index 22884522a..06baac2a9 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs | |||
@@ -85,10 +85,8 @@ impl<'a> InferenceContext<'a> { | |||
85 | ctor: TypeCtor::Tuple { cardinality: num_args as u16 }, | 85 | ctor: TypeCtor::Tuple { cardinality: num_args as u16 }, |
86 | parameters, | 86 | parameters, |
87 | }); | 87 | }); |
88 | let substs = Substs::build_for_generics(&generic_params) | 88 | let substs = |
89 | .push(ty.clone()) | 89 | Substs::build_for_generics(&generic_params).push(ty.clone()).push(arg_ty).build(); |
90 | .push(arg_ty.clone()) | ||
91 | .build(); | ||
92 | 90 | ||
93 | let trait_env = Arc::clone(&self.trait_env); | 91 | let trait_env = Arc::clone(&self.trait_env); |
94 | let implements_fn_trait = | 92 | let implements_fn_trait = |