use std::pin::Pin; use crate::stream::{FromStream, IntoStream, Extend}; impl FromStream for Vec { #[inline] fn from_stream<'a, S: IntoStream>( stream: S, ) -> Pin + 'a>> where ::IntoStream: 'a, { let stream = stream.into_stream(); Box::pin(async move { pin_utils::pin_mut!(stream); let mut out = vec![]; out.stream_extend(stream).await; out }) } }