Rollup merge of #150337 - AsakuraMizu:main, r=jhpratt

docs: fix typo in std::io::buffered
This commit is contained in:
Jonathan Brouwer
2025-12-31 17:32:05 +01:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
@@ -48,7 +48,7 @@ pub fn try_with_capacity(capacity: usize) -> io::Result<Self> {
#[inline]
pub fn buffer(&self) -> &[u8] {
// SAFETY: self.pos and self.cap are valid, and self.cap => self.pos, and
// SAFETY: self.pos and self.filled are valid, and self.filled >= self.pos, and
// that region is initialized because those are all invariants of this type.
unsafe { self.buf.get_unchecked(self.pos..self.filled).assume_init_ref() }
}
@@ -52,7 +52,7 @@ fn flush_if_completed_line(&mut self) -> io::Result<()> {
}
impl<'a, W: ?Sized + Write> Write for LineWriterShim<'a, W> {
/// Writes some data into this BufReader with line buffering.
/// Writes some data into this BufWriter with line buffering.
///
/// This means that, if any newlines are present in the data, the data up to
/// the last newline is sent directly to the underlying writer, and data
@@ -146,7 +146,7 @@ fn flush(&mut self) -> io::Result<()> {
self.buffer.flush()
}
/// Writes some vectored data into this BufReader with line buffering.
/// Writes some vectored data into this BufWriter with line buffering.
///
/// This means that, if any newlines are present in the data, the data up to
/// and including the buffer containing the last newline is sent directly to
@@ -256,7 +256,7 @@ fn is_write_vectored(&self) -> bool {
self.inner().is_write_vectored()
}
/// Writes some data into this BufReader with line buffering.
/// Writes some data into this BufWriter with line buffering.
///
/// This means that, if any newlines are present in the data, the data up to
/// the last newline is sent directly to the underlying writer, and data