Skip to content

Commit

Permalink
chore(clippy): Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
IshanGrover2004 committed Aug 10, 2024
1 parent e55d3ff commit 5c96a1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rust/lib_ccxr/src/util/bits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ pub fn get_crc32_byte(value: u8) -> u32 {
pub fn verify_crc32(buf: &[u8]) -> bool {
let mut crc: i32 = -1;
for &byte in buf {
let expr = (crc >> 24) as u8 ^ (byte & 0xff);
let expr = (crc >> 24) as u8 ^ byte;
crc = (crc << 8) ^ get_crc32_byte(expr) as i32;
}
crc == 0
Expand Down
3 changes: 1 addition & 2 deletions src/rust/lib_ccxr/src/util/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,7 @@ fn latin1_to_line21(c: Latin1Char) -> Line21Char {
0xe5 => 0xc9, // Lowercase A, ring
0xd8 => 0xca, // Uppercase O, slash
0xf8 => 0xcb, // Lowercase o, slash
0x00..=0x29 | 0x2b..=0x5b | 0x5d => c as Line21Char,
0x5c..=0x7a => c as Line21Char,
0x00..=0x29 | 0x2b..=0x5b | 0x5d..=0x7a => c as Line21Char,
_ => UNAVAILABLE_CHAR,
}
}
Expand Down

0 comments on commit 5c96a1c

Please sign in to comment.