actix_web_lab/
infallible_body_stream.rsuse actix_http::body::{BodyStream, SizedStream};
use bytes::Bytes;
use futures_core::Stream;
use crate::util::InfallibleStream;
pub fn new_infallible_body_stream<S: Stream<Item = Bytes>>(
stream: S,
) -> BodyStream<InfallibleStream<S>> {
BodyStream::new(InfallibleStream::new(stream))
}
pub fn new_infallible_sized_stream<S: Stream<Item = Bytes>>(
size: u64,
stream: S,
) -> SizedStream<InfallibleStream<S>> {
SizedStream::new(size, InfallibleStream::new(stream))
}