Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Add .flush() method to Serializer #251

Merged
merged 1 commit into from Jul 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ser.rs
Expand Up @@ -48,6 +48,11 @@ where
}
}

/// Calls [`.flush()`](io::Write::flush) on the underlying `io::Write` object.
pub fn flush(&mut self) -> io::Result<()> {
self.writer.flush()
}

/// Unwrap the underlying `io::Write` object from the `Serializer`.
pub fn into_inner(self) -> W {
self.writer
Expand Down