Skip to content

Commit

Permalink
Override Read::read_to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Jul 26, 2022
1 parent 5dbcc98 commit dc62774
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,10 @@ where
fn read_to_end(&mut self, buf: &mut std::vec::Vec<u8>) -> io::Result<usize> {
for_both!(*self, ref mut inner => inner.read_to_end(buf))
}

fn read_to_string(&mut self, buf: &mut std::string::String) -> io::Result<usize> {
for_both!(*self, ref mut inner => inner.read_to_string(buf))
}
}

#[cfg(any(test, feature = "use_std"))]
Expand Down

0 comments on commit dc62774

Please sign in to comment.