Skip to content

Commit d9b40ff

Browse files
committed
Make FillBufFuture constructor pub(crate)
1 parent 85b577a commit d9b40ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/io/buf_read/fill_buf.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub struct FillBufFuture<'a, R: ?Sized> {
1212
reader: &'a mut R,
1313
}
1414

15-
impl<'a, R: ?Sized> From<&'a mut R> for FillBufFuture<'a, R> {
16-
fn from(reader: &'a mut R) -> Self {
15+
impl<'a, R: ?Sized> FillBufFuture<'a, R> {
16+
pub(crate) fn new(reader: &'a mut R) -> Self {
1717
Self { reader }
1818
}
1919
}

src/io/buf_read/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub trait BufRead {
6060
where
6161
Self: Unpin,
6262
{
63-
FillBufFuture::from(self)
63+
FillBufFuture::new(self)
6464
}
6565

6666
/// Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.

0 commit comments

Comments
 (0)