From 40424d4222d4630bc53294d10f1718f2d3d300de Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:21:08 -0400 Subject: Fix clippy::identity_conversion --- crates/ra_hir/src/ty/infer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/ty') diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 58cfcd8a2..5edc59f18 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -539,7 +539,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { } })?; - resolved = Resolution::Def(item.into()); + resolved = Resolution::Def(item); } match resolved { @@ -762,7 +762,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { _ => &Ty::Unknown, }; let subty = self.infer_pat(*pat, expectation, default_bm); - Ty::apply_one(TypeCtor::Ref(*mutability), subty.into()) + Ty::apply_one(TypeCtor::Ref(*mutability), subty) } Pat::TupleStruct { path: ref p, args: ref subpats } => { self.infer_tuple_struct_pat(p.as_ref(), subpats, expected, default_bm) @@ -790,7 +790,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { let bound_ty = match mode { BindingMode::Ref(mutability) => { - Ty::apply_one(TypeCtor::Ref(mutability), inner_ty.clone().into()) + Ty::apply_one(TypeCtor::Ref(mutability), inner_ty.clone()) } BindingMode::Move => inner_ty.clone(), }; -- cgit v1.2.3