about summary refs log tree commit diff
path: root/clippy_utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'clippy_utils/src')
-rw-r--r--clippy_utils/src/hir_utils.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/clippy_utils/src/hir_utils.rs b/clippy_utils/src/hir_utils.rs
index f21098f95f7..97a15108d0c 100644
--- a/clippy_utils/src/hir_utils.rs
+++ b/clippy_utils/src/hir_utils.rs
@@ -1,6 +1,6 @@
 use crate::consts::constant_simple;
-use crate::source::snippet_opt;
 use crate::macros::macro_backtrace;
+use crate::source::snippet_opt;
 use rustc_ast::ast::InlineAsmTemplatePiece;
 use rustc_data_structures::fx::FxHasher;
 use rustc_hir::def::Res;
@@ -88,12 +88,12 @@ impl<'a, 'tcx> SpanlessEq<'a, 'tcx> {
     }
 
     fn cannot_be_compared_block(&mut self, block: &Block<'_>) -> bool {
-        if block.stmts.first().map_or(false, |stmt|
+        if block.stmts.first().map_or(false, |stmt| {
             matches!(
                 stmt.kind,
                 StmtKind::Semi(semi_expr) if self.should_ignore(semi_expr)
             )
-        ) {
+        }) {
             return true;
         }
 
@@ -107,12 +107,12 @@ impl<'a, 'tcx> SpanlessEq<'a, 'tcx> {
     }
 
     fn should_ignore(&mut self, expr: &Expr<'_>) -> bool {
-        if macro_backtrace(expr.span).last().map_or(false, |macro_call|
+        if macro_backtrace(expr.span).last().map_or(false, |macro_call| {
             matches!(
                 &self.cx.tcx.get_diagnostic_name(macro_call.def_id),
                 Some(sym::todo_macro | sym::unimplemented_macro)
             )
-        ) {
+        }) {
             return true;
         }