refactor/cksum ~ polish spelling (comments, names, and exceptions)
@@ -99,15 +99,15 @@ const fn crc_entry(input: u8) -> u32 {
// i += 1;
//}
unroll!(8, |_i| {
- let if_cond = crc & 0x8000_0000;
+ let if_condition = crc & 0x8000_0000;
let if_body = (crc << 1) ^ 0x04c1_1db7;
let else_body = crc << 1;
// NOTE: i feel like this is easier to understand than emulating an if statement in bitwise
// ops
- let cond_table = [else_body, if_body];
+ let condition_table = [else_body, if_body];
- crc = cond_table[(if_cond != 0) as usize];
+ crc = condition_table[(if_condition != 0) as usize];
});
crc
