diff options
author | Laurentiu Nicola <lnicola@dend.ro> | 2017-05-17 08:34:08 +0300 |
---|---|---|
committer | Paul Masurel <paul.masurel@gmail.com> | 2017-05-17 15:50:07 +0900 |
commit | a13122d392002faa71a68a2a1617b1a605901719 (patch) | |
tree | c97bf28c032876c5d4536098540d8a4119982c23 /src/common | |
parent | 113917c5217b5e0593bd8c1fc6dab38726bb0849 (diff) |
use explicit drop instead of suppression
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/bitpacker.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/bitpacker.rs b/src/common/bitpacker.rs index 1a8b820..fe94745 100644 --- a/src/common/bitpacker.rs +++ b/src/common/bitpacker.rs @@ -120,7 +120,8 @@ impl BitUnpacker { let addr = (idx * self.num_bits) / 8; let bit_shift = idx * self.num_bits - addr * 8; let val_unshifted_unmasked: u64; - debug_assert!(addr + 8 <= self.data_len, "The fast field field should have been padded with 7 bytes."); + debug_assert!(addr + 8 <= self.data_len, + "The fast field field should have been padded with 7 bytes."); val_unshifted_unmasked = unsafe { *(self.data_ptr.offset(addr as isize) as *const u64) }; let val_shifted = (val_unshifted_unmasked >> bit_shift) as u64; (val_shifted & self.mask) @@ -129,7 +130,7 @@ impl BitUnpacker { - + #[cfg(test)] mod test { use super::{BitPacker, BitUnpacker, compute_num_bits}; |