Skip to content

Commit

Permalink
Rollup merge of rust-lang#129675 - lolbinarycat:bufreader_peek_unsize…
Browse files Browse the repository at this point in the history
…d, r=workingjubilee

allow BufReader::peek to be called on unsized types

rust-lang#128405
  • Loading branch information
workingjubilee committed Aug 30, 2024
2 parents 4f2d244 + ae6f8a7 commit 605f8cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/std/src/io/buffered/bufreader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 605f8cf

Please sign in to comment.