diff --git a/io/src/lib.rs b/io/src/lib.rs index 696118f2..b52c5bdb 100644 --- a/io/src/lib.rs +++ b/io/src/lib.rs @@ -89,9 +89,10 @@ pub struct Take<'a, R: Read + ?Sized> { } impl<'a, R: Read + ?Sized> Take<'a, R> { + /// Reads all bytes until EOF from the underlying reader into `buf`. #[cfg(any(feature = "alloc", feature = "std"))] #[inline] - fn read_to_end(&mut self, buf: &mut Vec) -> Result { + pub fn read_to_end(&mut self, buf: &mut Vec) -> Result { let mut read: usize = 0; let mut chunk = [0u8; 64]; loop {