clippy: re-enable bool_to_int_with_if lint

This commit is contained in:
Daniel Hofstetter 2025-09-30 11:04:21 +02:00
parent 081e29c106
commit 8421df8fe1
3 changed files with 2 additions and 3 deletions

View file

@ -692,7 +692,6 @@ borrow_as_ptr = "allow"
ptr_as_ptr = "allow"
manual_let_else = "allow"
unnecessary_semicolon = "allow"
bool_to_int_with_if = "allow"
needless_raw_string_hashes = "allow"
unreadable_literal = "allow"
unnested_or_patterns = "allow"

View file

@ -483,7 +483,7 @@ impl LineFormat {
// r"\MD5 (a\\ b) = abc123",
// BLAKE2b(44)= a45a4c4883cce4b50d844fab460414cc2080ca83690e74d850a9253e757384366382625b218c8585daee80f34dc9eb2f2fde5fb959db81cd48837f9216e7b0fa
let trimmed = line.trim_ascii_start();
let algo_start = if trimmed.starts_with(b"\\") { 1 } else { 0 };
let algo_start = usize::from(trimmed.starts_with(b"\\"));
let rest = &trimmed[algo_start..];
enum SubCase {

View file

@ -212,7 +212,7 @@ fn shell_escaped_char_set(is_dirname: bool) -> &'static [u8] {
// the ':' colon character only induce quoting in the
// context of ls displaying a directory name before listing its content.
// (e.g. with the recursive flag -R)
let start_index = if is_dirname { 0 } else { 1 };
let start_index = usize::from(!is_dirname);
&ESCAPED_CHARS[start_index..]
}