diff options
| author | Benoît du Garreau <bdgdlm@outlook.com> | 2024-09-23 17:40:04 +0200 |
|---|---|---|
| committer | Benoît du Garreau <bdgdlm@outlook.com> | 2024-09-23 22:51:27 +0200 |
| commit | d77664bed945fbbd5ab102f59a38b1ef0e728b10 (patch) | |
| tree | 6fae49f0cb6bbd4c04ff8cd2e32fff1a2d2b4870 /library/std/src/io/mod.rs | |
| parent | 4b8a66c908be909ab9d451565d3959ffea45357d (diff) | |
| download | rust-d77664bed945fbbd5ab102f59a38b1ef0e728b10.tar.gz rust-d77664bed945fbbd5ab102f59a38b1ef0e728b10.zip | |
Add a comment to `Read::read_buf`
Diffstat (limited to 'library/std/src/io/mod.rs')
| -rw-r--r-- | library/std/src/io/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 954062a489c..dd6458c38c6 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -978,6 +978,8 @@ pub trait Read { /// with uninitialized buffers. The new data will be appended to any existing contents of `buf`. /// /// The default implementation delegates to `read`. + /// + /// This method makes it possible to return both data and an error but it is advised against. #[unstable(feature = "read_buf", issue = "78485")] fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<()> { default_read_buf(|b| self.read(b), buf) |
