refactor(lib): Switch from pin-project to pin-project-lite
This commit is contained in:
committed by
Sean McArthur
parent
9dff00425d
commit
43412a950f
@@ -5,7 +5,7 @@ use http::header::{
|
||||
TRANSFER_ENCODING, UPGRADE,
|
||||
};
|
||||
use http::HeaderMap;
|
||||
use pin_project::pin_project;
|
||||
use pin_project_lite::pin_project;
|
||||
use std::error::Error as StdError;
|
||||
use std::io::IoSlice;
|
||||
|
||||
@@ -94,15 +94,16 @@ fn decode_content_length(headers: &HeaderMap) -> DecodedLength {
|
||||
|
||||
// body adapters used by both Client and Server
|
||||
|
||||
#[pin_project]
|
||||
struct PipeToSendStream<S>
|
||||
where
|
||||
S: HttpBody,
|
||||
{
|
||||
body_tx: SendStream<SendBuf<S::Data>>,
|
||||
data_done: bool,
|
||||
#[pin]
|
||||
stream: S,
|
||||
pin_project! {
|
||||
struct PipeToSendStream<S>
|
||||
where
|
||||
S: HttpBody,
|
||||
{
|
||||
body_tx: SendStream<SendBuf<S::Data>>,
|
||||
data_done: bool,
|
||||
#[pin]
|
||||
stream: S,
|
||||
}
|
||||
}
|
||||
|
||||
impl<S> PipeToSendStream<S>
|
||||
|
||||
Reference in New Issue
Block a user