mirror of
https://github.com/uutils/sed.git
synced 2026-06-10 16:14:15 -07:00
clippy: fix cast_lossless lint
This commit is contained in:
committed by
Sylvestre Ledru
parent
b295d213e8
commit
dc9be6018c
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user