1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 16:44:06 +02:00
This commit is contained in:
Robin Appelman 2020-01-07 23:12:27 +01:00
commit 758bba200b
3 changed files with 9 additions and 14 deletions

View file

@ -611,14 +611,14 @@ impl<E: Endianness> Debug for BitBuffer<E> {
#[inline(always)]
fn contains_zero_byte_non_top(x: usize) -> bool {
#[cfg(target_pointer_width = "64")]
const LO_USIZE: usize = 0x0001010101010101;
const LO_USIZE: usize = 0x0001_0101_0101_0101;
#[cfg(target_pointer_width = "64")]
const HI_USIZE: usize = 0x0080808080808080;
const HI_USIZE: usize = 0x0080_8080_8080_8080;
#[cfg(target_pointer_width = "32")]
const LO_USIZE: usize = 0x00010101;
const LO_USIZE: usize = 0x000_10101;
#[cfg(target_pointer_width = "32")]
const HI_USIZE: usize = 0x00808080;
const HI_USIZE: usize = 0x0080_8080;
x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0
}

View file

@ -114,7 +114,7 @@ pub trait BitRead<E: Endianness>: Sized {
/// on the bit stream
#[inline(always)]
fn bit_size() -> Option<usize> {
return None;
None
}
}
@ -414,7 +414,7 @@ pub trait BitReadSized<E: Endianness>: Sized {
/// on the bit stream
#[inline(always)]
fn bit_size_sized(_size: usize) -> Option<usize> {
return None;
None
}
}