diff --git a/futures-core/src/stream.rs b/futures-core/src/stream.rs index 37c60c9c6b..1f0f9a6e45 100644 --- a/futures-core/src/stream.rs +++ b/futures-core/src/stream.rs @@ -214,22 +214,6 @@ mod if_alloc { } } - impl Stream for alloc::collections::VecDeque { - type Item = T; - - fn poll_next( - mut self: Pin<&mut Self>, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(self.pop_front()) - } - - fn size_hint(&self) -> (usize, Option) { - let len = self.len(); - (len, Some(len)) - } - } - #[cfg(feature = "std")] impl Stream for std::panic::AssertUnwindSafe { type Item = S::Item; diff --git a/futures-util/src/sink/mod.rs b/futures-util/src/sink/mod.rs index c35a48f180..3bf5eb7206 100644 --- a/futures-util/src/sink/mod.rs +++ b/futures-util/src/sink/mod.rs @@ -93,13 +93,12 @@ pub trait SinkExt: Sink { /// # futures::executor::block_on(async { /// use futures::channel::mpsc; /// use futures::sink::SinkExt; - /// use futures::stream::StreamExt; - /// use std::collections::VecDeque; + /// use futures::stream::{self, StreamExt}; /// /// let (tx, rx) = mpsc::channel(5); /// /// let mut tx = tx.with_flat_map(|x| { - /// VecDeque::from(vec![Ok(42); x]) + /// stream::iter(vec![Ok(42); x]) /// }); /// /// tx.send(5).await.unwrap();