Skip to content

Commit

Permalink
Mark unnecessary_first_then_check and byte_char_slices as Applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Oct 11, 2024
1 parent b85f632 commit 8d1ebec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/byte_char_slices.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl EarlyLintPass for ByteCharSlice {
"can be more succinctly written as a byte str",
"try",
format!("b\"{slice}\""),
Applicability::MaybeIncorrect,
Applicability::MachineApplicable,
);
}
}
Expand All @@ -67,7 +67,7 @@ fn is_byte_char_slices(expr: &Expr) -> Option<String> {
})
.map(|maybe_quote| match maybe_quote {
Some("\"") => Some("\\\""),
Some("\\'") => Some("'"),
Some("\\'") => Some("'"),\
other => other,
})
.collect::<Option<String>>()
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/unnecessary_first_then_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub(super) fn check(
),
"replace this with",
suggestion,
Applicability::MaybeIncorrect,
Applicability::MachineApplicable,
);
}
}

0 comments on commit 8d1ebec

Please sign in to comment.