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 2019-03-03 02:33:59 +01:00
commit 48a0c85d19

View file

@ -7,10 +7,10 @@ use std::ops::BitOrAssign;
use num_traits::{Float, PrimInt}; use num_traits::{Float, PrimInt};
use crate::{ReadError, Result};
use crate::endianness::Endianness; use crate::endianness::Endianness;
use crate::is_signed::IsSigned; use crate::is_signed::IsSigned;
use crate::unchecked_primitive::{UncheckedPrimitiveFloat, UncheckedPrimitiveInt}; use crate::unchecked_primitive::{UncheckedPrimitiveFloat, UncheckedPrimitiveInt};
use crate::{ReadError, Result};
const USIZE_SIZE: usize = size_of::<usize>(); const USIZE_SIZE: usize = size_of::<usize>();
@ -34,7 +34,7 @@ const USIZE_SIZE: usize = size_of::<usize>();
/// # } /// # }
/// ``` /// ```
pub struct BitBuffer<E> pub struct BitBuffer<E>
where where
E: Endianness, E: Endianness,
{ {
bytes: Vec<u8>, bytes: Vec<u8>,
@ -44,7 +44,7 @@ pub struct BitBuffer<E>
} }
impl<E> BitBuffer<E> impl<E> BitBuffer<E>
where where
E: Endianness, E: Endianness,
{ {
/// Create a new BitBuffer from a byte vector /// Create a new BitBuffer from a byte vector
@ -72,7 +72,7 @@ impl<E> BitBuffer<E>
} }
impl<E> BitBuffer<E> impl<E> BitBuffer<E>
where where
E: Endianness, E: Endianness,
{ {
/// The available number of bits in the buffer /// The available number of bits in the buffer