Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Melirius committed Nov 21, 2024
1 parent 3e32519 commit c5b75fa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/structs/vpx_bool_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ impl<W: Write> VPXBoolWriter<W> {

// each added bit can extend stream for up to 7 bits
#[inline(always)]
fn cannot_put_bits(
tmp_value: u64, num_bits: u32
) -> bool {
fn cannot_put_bits(tmp_value: u64, num_bits: u32) -> bool {
tmp_value & (u64::MAX << (64 - num_bits * 7)) != 0
}

Expand Down Expand Up @@ -321,7 +319,11 @@ impl<W: Write> VPXBoolWriter<W> {
stream_bytes -= 1;
}
// check that no stream bits remain in the buffer
debug_assert!(if shift == 56 {tmp_value == 0} else {!(u64::MAX << (shift + 8)) & tmp_value == 0});
debug_assert!(if shift == 56 {
tmp_value == 0
} else {
!(u64::MAX << (shift + 8)) & tmp_value == 0
});

self.writer.write_all(&self.buffer[..])?;
Ok(())
Expand Down

0 comments on commit c5b75fa

Please sign in to comment.