diff --git a/src/crc32.rs b/src/crc32.rs index 9fefa7f9..ec3d2638 100644 --- a/src/crc32.rs +++ b/src/crc32.rs @@ -54,9 +54,9 @@ pub fn update(prev: u32, buf: &[u8]) -> u32 { let mut crc = !prev; - for byte in buf.iter() + for &byte in buf.iter() { - crc = CRC32_TABLE[(crc as u8 ^ *byte) as usize] ^ (crc >> 8); + crc = CRC32_TABLE[((crc as u8) ^ byte) as usize] ^ (crc >> 8); } !crc