From 62e62d1c23213e67e22e37205eb78b273b13392f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 2 Mar 2020 14:28:34 +0100 Subject: Reformat? --- crates/ra_hir_def/src/path/lower.rs | 6 +----- crates/ra_hir_ty/src/infer/pat.rs | 8 ++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs index 0934520d7..4900000fe 100644 --- a/crates/ra_hir_def/src/path/lower.rs +++ b/crates/ra_hir_def/src/path/lower.rs @@ -101,11 +101,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option break; } ast::PathSegmentKind::SuperKw => { - let nested_super_count = if let PathKind::Super(n) = kind { - n - } else { - 0 - }; + let nested_super_count = if let PathKind::Super(n) = kind { n } else { 0 }; kind = PathKind::Super(nested_super_count + 1); } } diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/ra_hir_ty/src/infer/pat.rs index 623e52599..7a84e47f8 100644 --- a/crates/ra_hir_ty/src/infer/pat.rs +++ b/crates/ra_hir_ty/src/infer/pat.rs @@ -187,12 +187,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { } Pat::Slice { prefix, slice: _slice, suffix } => { let (container_ty, elem_ty) = match &expected { - ty_app!(TypeCtor::Array, st) => { - (TypeCtor::Array, st.as_single().clone()) - }, - ty_app!(TypeCtor::Slice, st) => { - (TypeCtor::Slice, st.as_single().clone()) - }, + ty_app!(TypeCtor::Array, st) => (TypeCtor::Array, st.as_single().clone()), + ty_app!(TypeCtor::Slice, st) => (TypeCtor::Slice, st.as_single().clone()), _ => (TypeCtor::Slice, Ty::Unknown), }; -- cgit v1.2.3