Skip to content

Commit 0b76137

Browse files
committed
typos
1 parent 43e581a commit 0b76137

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/0000-read-buf.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl<'a> ReadBuf<'a> {
354354
///
355355
/// # Panics
356356
///
357-
/// Panics if the filled region of the buffer would become larger than the intialized region.
357+
/// Panics if the filled region of the buffer would become larger than the initialized region.
358358
#[inline]
359359
pub fn set_filled(&mut self, n: usize) { ... }
360360

@@ -365,7 +365,7 @@ impl<'a> ReadBuf<'a> {
365365
///
366366
/// # Safety
367367
///
368-
/// The caller must ensure that `n` unfilled bytes of the buffer have already been initialized.
368+
/// The caller must ensure that the first `n` unfilled bytes of the buffer have already been initialized.
369369
#[inline]
370370
pub unsafe fn assume_init(&mut self, n: usize) { ... }
371371

@@ -411,7 +411,7 @@ Thinking back to the `BrokenReader` in the motivation section, the worst an impl
411411
unsound unsafe code) is to fail to actually write useful data into the buffer. Code using a `BrokenReader` may see bad
412412
data in the buffer, but the bad data at least has defined contents now!
413413

414-
Note that `read` is still a required method of the `Read` trait. It can be easily written to delegate to read_buf:
414+
Note that `read` is still a required method of the `Read` trait. It can be easily written to delegate to `read_buf`:
415415

416416
```rust
417417
impl Read for SomeReader {
@@ -552,7 +552,7 @@ impl<'a> ReadBufs<'a> {
552552

553553
/// Creates a new `ReadBufs` from a set of fully uninitialized buffers.
554554
///
555-
/// Use `assume_initialized` if part of the buffers are known to be already initialized.
555+
/// Use `assume_init` if part of the buffers are known to be already initialized.
556556
#[inline]
557557
pub fn uninit(bufs: &'a mut [MaybeUninitIoSliceMut<'a>]) -> ReadBufs<'a> { ... }
558558

0 commit comments

Comments
 (0)