Update library/std/src/io/mod.rs

Co-authored-by: Jacob Lifshay <programmerjake@gmail.com>
This commit is contained in:
Michal Nazarewicz 2023-03-03 03:16:56 +01:00 committed by GitHub
parent 5451dfe6c0
commit 7d57cd524a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1393,7 +1393,7 @@ pub trait Write {
/// an [`Err`] variant. /// an [`Err`] variant.
/// ///
/// If this method consumed `n > 0` bytes of `buf` it must return [`Ok(n)`]. /// If this method consumed `n > 0` bytes of `buf` it must return [`Ok(n)`].
/// If the return value is `Ok(n)` it must hold than `n <= buf.len()`. /// If the return value is `Ok(n)` then `n` must satisfy `n <= buf.len()`.
/// Unless `buf` is empty, this function shouldnt return `Ok(0)` since the /// Unless `buf` is empty, this function shouldnt return `Ok(0)` since the
/// caller may interpret that as an error. To indicate lack of space, /// caller may interpret that as an error. To indicate lack of space,
/// implementors should return [`ErrorKind::StorageFull`] error instead. /// implementors should return [`ErrorKind::StorageFull`] error instead.