@@ -30,19 +30,16 @@ if let StmtKind::Let(local) = stmt.kind
3030 && let PatKind::Binding(BindingMode::NONE, _, name1, None) = local2.pat.kind
3131 && name1.as_str() == "args"
3232 && let Some(trailing_expr) = block1.expr
33- && let ExprKind::Call(func2, args2) = trailing_expr.kind
34- && paths::CORE_FMT_RT_NEW_V1.matches_path(cx, func2) // Add the path to `clippy_utils::paths` if needed
33+ && let ExprKind::Block(block2, None) = trailing_expr.kind
34+ && block2.stmts.is_empty()
35+ && let Some(trailing_expr1) = block2.expr
36+ && let ExprKind::Call(func2, args2) = trailing_expr1.kind
37+ && paths::CORE_FMT_RT_NEW.matches_path(cx, func2) // Add the path to `clippy_utils::paths` if needed
3538 && args2.len() == 2
36- && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[0].kind
37- && let ExprKind::Array(elements2) = inner1.kind
38- && elements2.len() == 2
39- && let ExprKind::Lit(ref lit) = elements2[0].kind
40- && let LitKind::Str(s, _) = lit.node
41- && s.as_str() == ""
42- && let ExprKind::Lit(ref lit1) = elements2[1].kind
43- && let LitKind::Str(s1, _) = lit1.node
44- && s1.as_str() == "\n"
45- && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner2) = args2[1].kind
39+ && let ExprKind::Lit(ref lit) = args2[0].kind
40+ && let LitKind::ByteStr(ref vec) = lit.node
41+ && let [[128, 1, 10, 0]] = **vec
42+ && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner1) = args2[1].kind
4643 && block.expr.is_none()
4744 && let PatKind::Binding(BindingMode::NONE, _, name2, None) = local.pat.kind
4845 && name2.as_str() == "print_text"
0 commit comments