about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2023-02-03 18:38:51 +0100
committerGitHub <noreply@github.com>2023-02-03 18:38:51 +0100
commit8654669ed4569216fde2c16edb49d05cd373f038 (patch)
tree1e344e6880df76f7af2e9f14db5b2d2e98b0636e /library/std/src
parent316742edb73a81edc231b1c8dc086fae1f3142d9 (diff)
downloadrust-8654669ed4569216fde2c16edb49d05cd373f038.tar.gz
rust-8654669ed4569216fde2c16edb49d05cd373f038.zip
Update library/std/src/io/mod.rs
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index aa34d4be192..d4f8c3123b2 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -1392,10 +1392,10 @@ pub trait Write {
     /// written, and a write which would otherwise block can be indicated through
     /// an [`Err`] variant.
     ///
-    /// If the return value is [`Ok(n)`] then it must be guaranteed that `n <=
-    /// buf.len()`. Unless `input` is empty, this function shouldn’t return `0`
-    /// since caller may interpret that as an error (the default implementation
-    /// of [`Write::write_all`] does exactly that).  To indicate lack of space
+    /// 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()`.
+    /// Unless `input` is empty, this function shouldn’t return `Ok(0)` since
+    /// caller may interpret that as an error.  To indicate lack of space
     /// function should return [`ErrorKind::StorageFull`] error instead.
     ///
     /// # Errors