Skip to content

Commit

Permalink
feat: implement into_inner for Encoder
Browse files Browse the repository at this point in the history
Fixes: #64

Signed-off-by: Ahmed Charles <[email protected]>
  • Loading branch information
ahmedcharles authored and rjzak committed Feb 19, 2024
1 parent defdddd commit d0e5327
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ciborium-ll/src/enc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ impl<W: Write> Write for Encoder<W> {
}

impl<W: Write> Encoder<W> {
/// Unwraps the `Write`, consuming the `Encoder`.
pub fn into_inner(self) -> W {
self.0
}

/// Push a `Header` to the wire
#[inline]
pub fn push(&mut self, header: Header) -> Result<(), W::Error> {
Expand Down

0 comments on commit d0e5327

Please sign in to comment.