mirror of
https://codeberg.org/icewind/bitbuffer.git
synced 2026-06-03 08:34:07 +02:00
more empty write fixes
This commit is contained in:
parent
716d32fecb
commit
9e0fa4df0b
1 changed files with 3 additions and 1 deletions
|
|
@ -44,8 +44,10 @@ impl<'a, E: Endianness> WriteBuffer<'a, E> {
|
|||
|
||||
/// Push up to an usize worth of bits
|
||||
pub fn push_bits(&mut self, bits: usize, count: usize) {
|
||||
if count > 0 {
|
||||
self.0.push_bits(bits, count)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reserve(&mut self, length: usize) -> (WriteBuffer<E>, WriteBuffer<E>) {
|
||||
let (head, tail) = self.0.reserve(length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue