From 1340b16e71caa0c33f6f0e9fae4c0b17b217fe9d Mon Sep 17 00:00:00 2001 From: jongiddy Date: Sun, 15 Jan 2023 06:44:12 +0000 Subject: [PATCH] Remove incorrect error behavior from `ready_chunks` docs (#2687) Unlike `TryStream::try_chunks`, which has similar documentation and can handle `Some(Err(_))` specially, `Stream::ready_chunks` does not and cannot know whether the stream item represents an error condition, and does not include any code to return early on an error. --- futures-util/src/stream/stream/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/futures-util/src/stream/stream/mod.rs b/futures-util/src/stream/stream/mod.rs index a823fab12..bb5e24907 100644 --- a/futures-util/src/stream/stream/mod.rs +++ b/futures-util/src/stream/stream/mod.rs @@ -1513,8 +1513,7 @@ pub trait StreamExt: Stream { /// be immediately returned. /// /// If the underlying stream ended and only a partial vector was created, - /// it'll be returned. Additionally if an error happens from the underlying - /// stream then the currently buffered items will be yielded. + /// it will be returned. /// /// This method is only available when the `std` or `alloc` feature of this /// library is activated, and it is activated by default.