Skip to content

Commit

Permalink
remove the writer reference requirement (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbran authored and wcampbell0x2a committed Dec 28, 2023
1 parent c0507e2 commit 24a18ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ const fn bits_of<T>() -> usize {
}

/// Container to use with `to_writer`
pub struct Writer<'a, W: Write> {
pub(crate) inner: &'a mut W,
pub struct Writer<W: Write> {
pub(crate) inner: W,
/// Leftover bits
pub leftover: BitVec<u8, Msb0>,
/// Total bits written
pub bits_written: usize,
}

impl<'a, W: Write> Writer<'a, W> {
impl<W: Write> Writer<W> {
/// Create a new `Writer`
#[inline]
pub fn new(inner: &'a mut W) -> Self {
pub fn new(inner: W) -> Self {
Self {
inner,
leftover: BitVec::new(),
Expand Down

0 comments on commit 24a18ef

Please sign in to comment.