clippy: fix cast_lossless lint

This commit is contained in:
xtqqczze
2026-03-19 22:05:47 +01:00
committed by Sylvestre Ledru
parent b295d213e8
commit dc9be6018c
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -157,7 +157,6 @@ manual_assert = "allow" # 2
ignore_without_reason = "allow" # 2
if_not_else = "allow" # 2
format_push_string = "allow" # 2
cast_lossless = "allow" # 2
should_panic_without_expect = "allow" # 1
many_single_char_names = "allow" # 1
comparison_chain = "allow"
+1 -1
View File
@@ -77,7 +77,7 @@ fn create_control_char(x: char) -> Option<char> {
let c = x.to_ascii_uppercase();
let transformed = (c as u8) ^ 0x40;
char::from_u32(transformed as u32)
char::from_u32(u32::from(transformed))
}
/// Parse a character escape valid in all contexts (RE pattern, substitution,