Skip to content

Commit d835769

Browse files
committed
fmt by hand
1 parent d2d1794 commit d835769

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clippy_lints/src/option_needless_deref.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,13 @@ impl<'tcx> LateLintPass<'tcx> for OptionNeedlessDeref {
4747
let outer_ty = typeck.expr_ty(expr);
4848

4949
if_chain! {
50-
if is_type_diagnostic_item(cx,outer_ty,sym::option_type) ||
51-
is_type_diagnostic_item(cx,outer_ty,sym::result_type) ;
50+
if is_type_diagnostic_item(cx,outer_ty,sym::option_type) ||
51+
is_type_diagnostic_item(cx,outer_ty,sym::result_type) ;
5252
if let ExprKind::MethodCall(path, _, [sub_expr], _) = expr.kind;
53-
let symbol = &*path.ident.as_str();
54-
if symbol=="as_deref" || symbol=="as_deref_mut";
53+
let symbol = &*path.ident.as_str();
54+
if symbol=="as_deref" || symbol=="as_deref_mut";
5555
if TyS::same_type( outer_ty, typeck.expr_ty(sub_expr) );
5656
then{
57-
5857
span_lint_and_sugg(
5958
cx,
6059
OPTION_NEEDLESS_DEREF,
@@ -64,7 +63,6 @@ impl<'tcx> LateLintPass<'tcx> for OptionNeedlessDeref {
6463
snippet_opt(cx,sub_expr.span).unwrap(),
6564
Applicability::MachineApplicable
6665
);
67-
6866
}
6967
}
7068
}

0 commit comments

Comments
 (0)