Skip to content

Commit

Permalink
impl Read for Record<StreamingBody> (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhwgh1968 authored Oct 19, 2021
1 parent 8a3ce43 commit c7b20a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,12 @@ impl<'t, T: Read + 't> Record<StreamingBody<'t, T>> {
}
}

impl<'t, T: Read + 't> Read for Record<StreamingBody<'t, T>> {
fn read(&mut self, dst: &mut [u8]) -> Result<usize, std::io::Error> {
self.body.read(dst)
}
}

impl Default for Record<BufferedBody> {
fn default() -> Record<BufferedBody> {
Record {
Expand Down

0 comments on commit c7b20a1

Please sign in to comment.