This commit is contained in:
nora 2023-03-07 14:12:35 +01:00
parent 189f24e53b
commit 944f82360f
34 changed files with 95 additions and 134 deletions

View file

@ -6,14 +6,13 @@ use bytes::Bytes;
use futures_channel::mpsc;
use futures_channel::oneshot;
use futures_core::Stream;
#[cfg(feature = "stream")]
use futures_util::TryStreamExt;
use http::HeaderMap;
use http_body::{Body as HttpBody, SizeHint};
use super::DecodedLength;
#[cfg(feature = "stream")]
use crate::common::sync_wrapper::SyncWrapper;
use crate::common::Future;
#[cfg(all(feature = "client", any(feature = "http1", feature = "http2")))]
use crate::common::Never;
use crate::common::{task, watch, Pin, Poll};

View file

@ -25,13 +25,6 @@ mod aggregate;
mod body;
mod length;
mod to_bytes;
/// An optimization to try to take a full body if immediately available.
///
/// This is currently limited to *only* `hyper::Body`s.
#[cfg(feature = "http1")]
pub(crate) fn take_full_data<T: HttpBody + 'static>(body: &mut T) -> Option<T::Data> {
loop {}
}
fn _assert_send_sync() {
loop {}
}

View file

@ -1,4 +1,4 @@
use bytes::{Buf, BufMut, Bytes};
use bytes::{Bytes};
use super::HttpBody;
/// Concatenate the buffers from a body into a single `Bytes` asynchronously.
///