clippy::single_match(_else) may be machine applicable

This commit is contained in:
Kornel 2024-04-28 00:15:56 +01:00
parent c6bf9548d5
commit b700d9c928
No known key found for this signature in database

View file

@ -75,7 +75,7 @@ fn report_single_pattern(
) {
let lint = if els.is_some() { SINGLE_MATCH_ELSE } else { SINGLE_MATCH };
let ctxt = expr.span.ctxt();
let mut app = Applicability::HasPlaceholders;
let mut app = Applicability::MachineApplicable;
let els_str = els.map_or(String::new(), |els| {
format!(" else {}", expr_block(cx, els, ctxt, "..", Some(expr.span), &mut app))
});