mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
allow BufReader::peek to be called on unsized types
This commit is contained in:
parent
600edc948a
commit
ae6f8a7764
@ -94,7 +94,9 @@ impl<R: Read> BufReader<R> {
|
||||
pub fn with_capacity(capacity: usize, inner: R) -> BufReader<R> {
|
||||
BufReader { inner, buf: Buffer::with_capacity(capacity) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<R: Read + ?Sized> BufReader<R> {
|
||||
/// Attempt to look ahead `n` bytes.
|
||||
///
|
||||
/// `n` must be less than `capacity`.
|
||||
|
Loading…
Reference in New Issue
Block a user