@@ -175,10 +175,10 @@ impl Crc {
175175 crc_fast:: CrcParams :: new (
176176 "CRC-32/CKSUM" , // Name
177177 32 , // Width
178- 0x04c11db7 , // Polynomial
179- 0x00000000 , // Initial CRC value: 0 (not 0xffffffff)
178+ 0x04c1_1db7 , // Polynomial
179+ 0x0000_0000 , // Initial CRC value: 0 (not 0xffffffff)
180180 false , // No input reflection (refin)
181- 0xffffffff , // XOR output with 0xffffffff (xorout)
181+ 0xffff_ffff , // XOR output with 0xffffffff (xorout)
182182 0 , // Check value (not used)
183183 )
184184 }
@@ -245,7 +245,7 @@ impl Digest for CRC32B {
245245 let result = self . digest . finalize ( ) ;
246246 // crc_fast returns a 64-bit value, but CRC32B should be 32-bit
247247 // Take the lower 32 bits and convert to big-endian bytes
248- let crc32_value = ( result & 0xffffffff ) as u32 ;
248+ let crc32_value = ( result & 0xffff_ffff ) as u32 ;
249249 out. copy_from_slice ( & crc32_value. to_be_bytes ( ) ) ;
250250 }
251251
@@ -601,7 +601,7 @@ mod tests {
601601 assert_ne ! ( empty_result, test_result) ;
602602
603603 // Test known value: "test" should give 3076352578
604- assert_eq ! ( test_result, 3076352578 ) ;
604+ assert_eq ! ( test_result, 3_076_352_578 ) ;
605605 }
606606
607607 #[ test]
@@ -653,9 +653,9 @@ mod tests {
653653 // Test against our CRC implementation values
654654 // Note: These are the correct values for our POSIX cksum implementation
655655 let test_cases = [
656- ( "" , 4294967295_u64 ) ,
657- ( "a" , 1220704766_u64 ) ,
658- ( "abc" , 1219131554_u64 ) ,
656+ ( "" , 4_294_967_295_u64 ) ,
657+ ( "a" , 1_220_704_766_u64 ) ,
658+ ( "abc" , 1_219_131_554_u64 ) ,
659659 ] ;
660660
661661 for ( input, expected) in test_cases {
0 commit comments