diff options
author | Jeremy Kolb <[email protected]> | 2019-07-05 17:02:32 +0100 |
---|---|---|
committer | Jeremy Kolb <[email protected]> | 2019-07-05 17:02:32 +0100 |
commit | 001e34e6e31503195d176a349bc9476681c79e7f (patch) | |
tree | facf2c398e8dd428225a84455437abf81a478ee0 /crates/ra_hir/src/ty/infer.rs | |
parent | ec6f71576ace170fd306a68f77e5c5e9646d15be (diff) |
Clippy trivially_copy_pass_by_ref
Diffstat (limited to 'crates/ra_hir/src/ty/infer.rs')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 8322de0a8..a23daabc2 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -85,7 +85,7 @@ enum BindingMode { | |||
85 | } | 85 | } |
86 | 86 | ||
87 | impl BindingMode { | 87 | impl BindingMode { |
88 | pub fn convert(annotation: &BindingAnnotation) -> BindingMode { | 88 | pub fn convert(annotation: BindingAnnotation) -> BindingMode { |
89 | match annotation { | 89 | match annotation { |
90 | BindingAnnotation::Unannotated | BindingAnnotation::Mutable => BindingMode::Move, | 90 | BindingAnnotation::Unannotated | BindingAnnotation::Mutable => BindingMode::Move, |
91 | BindingAnnotation::Ref => BindingMode::Ref(Mutability::Shared), | 91 | BindingAnnotation::Ref => BindingMode::Ref(Mutability::Shared), |
@@ -778,7 +778,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
778 | let mode = if mode == &BindingAnnotation::Unannotated { | 778 | let mode = if mode == &BindingAnnotation::Unannotated { |
779 | default_bm | 779 | default_bm |
780 | } else { | 780 | } else { |
781 | BindingMode::convert(mode) | 781 | BindingMode::convert(*mode) |
782 | }; | 782 | }; |
783 | let inner_ty = if let Some(subpat) = subpat { | 783 | let inner_ty = if let Some(subpat) = subpat { |
784 | self.infer_pat(*subpat, expected, default_bm) | 784 | self.infer_pat(*subpat, expected, default_bm) |