diff options
author | Shotaro Yamada <[email protected]> | 2019-07-05 04:41:53 +0100 |
---|---|---|
committer | Shotaro Yamada <[email protected]> | 2019-07-05 04:45:58 +0100 |
commit | d0e9cd2bc655f13392c6687afa72e4dca706abbe (patch) | |
tree | eb325b0b466a9267755c3e457727f63d86c65257 /crates/ra_hir/src | |
parent | 21f70a7293e7b24dedeec9a504763a1a3ef57675 (diff) |
Fix clippy::redundant_clone
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index ed640d7fc..7d5d9b995 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -169,7 +169,7 @@ impl ModuleSource { | |||
169 | (None, Some(item_id)) => { | 169 | (None, Some(item_id)) => { |
170 | let module = item_id.to_node(db); | 170 | let module = item_id.to_node(db); |
171 | assert!(module.item_list().is_some(), "expected inline module"); | 171 | assert!(module.item_list().is_some(), "expected inline module"); |
172 | ModuleSource::Module(module.to_owned()) | 172 | ModuleSource::Module(module) |
173 | } | 173 | } |
174 | (None, None) => panic!(), | 174 | (None, None) => panic!(), |
175 | } | 175 | } |
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 9228dd314..f47f4c5de 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -895,8 +895,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
895 | } | 895 | } |
896 | None => (receiver_ty, Ty::Unknown, None), | 896 | None => (receiver_ty, Ty::Unknown, None), |
897 | }; | 897 | }; |
898 | let substs = | 898 | let substs = self.substs_for_method_call(def_generics, generic_args, &derefed_receiver_ty); |
899 | self.substs_for_method_call(def_generics.clone(), generic_args, &derefed_receiver_ty); | ||
900 | let method_ty = method_ty.apply_substs(substs); | 899 | let method_ty = method_ty.apply_substs(substs); |
901 | let method_ty = self.insert_type_vars(method_ty); | 900 | let method_ty = self.insert_type_vars(method_ty); |
902 | self.register_obligations_for_call(&method_ty); | 901 | self.register_obligations_for_call(&method_ty); |