Skip to content

Commit 0f46775

Browse files
committed
chore: typo
Related: rust-lang/rust#150337
1 parent 275689d commit 0f46775

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/buffered/bufreader/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl Buffer {
5454

5555
#[inline]
5656
pub fn buffer(&self) -> &[u8] {
57-
// SAFETY: self.pos and self.cap are valid, and self.cap => self.pos, and
57+
// SAFETY: self.pos and self.filled are valid, and self.filled >= self.pos, and
5858
// that region is initialized because those are all invariants of this type.
5959
unsafe {
6060
self.buf

src/buffered/linewriter/shim.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'a, W: ?Sized + Write> LineWriterShim<'a, W> {
4444
}
4545

4646
impl<'a, W: ?Sized + Write> Write for LineWriterShim<'a, W> {
47-
/// Writes some data into this BufReader with line buffering.
47+
/// Writes some data into this BufWriter with line buffering.
4848
///
4949
/// This means that, if any newlines are present in the data, the data up to
5050
/// the last newline is sent directly to the underlying writer, and data
@@ -137,7 +137,7 @@ impl<'a, W: ?Sized + Write> Write for LineWriterShim<'a, W> {
137137
self.buffer.flush()
138138
}
139139

140-
/// Writes some data into this BufReader with line buffering.
140+
/// Writes some data into this BufWriter with line buffering.
141141
///
142142
/// This means that, if any newlines are present in the data, the data up to
143143
/// the last newline is sent directly to the underlying writer, and data

0 commit comments

Comments
 (0)