Skip to content

Commit ae6f8a7

Browse files
committed
allow BufReader::peek to be called on unsized types
1 parent 600edc9 commit ae6f8a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/io/buffered/bufreader.rs

+2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ impl<R: Read> BufReader<R> {
9494
pub fn with_capacity(capacity: usize, inner: R) -> BufReader<R> {
9595
BufReader { inner, buf: Buffer::with_capacity(capacity) }
9696
}
97+
}
9798

99+
impl<R: Read + ?Sized> BufReader<R> {
98100
/// Attempt to look ahead `n` bytes.
99101
///
100102
/// `n` must be less than `capacity`.

0 commit comments

Comments
 (0)