Reformat?

This commit is contained in:
Aleksey Kladov 2020-03-02 14:28:34 +01:00
parent cf23ca7719
commit 62e62d1c23
2 changed files with 3 additions and 11 deletions

View file

@ -101,11 +101,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option<Path>
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);
}
}

View file

@ -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),
};