@@ -9,23 +9,23 @@ use pin_utils::unsafe_pinned;
99/// Future for the [`copy_into`](super::AsyncReadExt::copy_into) method.
1010#[ derive( Debug ) ]
1111#[ must_use = "futures do nothing unless you `.await` or poll them" ]
12- pub struct CopyInto < R : AsyncRead , W > {
13- inner : CopyBufInto < BufReader < R > , W > ,
12+ pub struct CopyInto < ' a , R : AsyncRead , W > {
13+ inner : CopyBufInto < ' a , BufReader < R > , W > ,
1414}
1515
16- impl < R : AsyncRead , W > Unpin for CopyInto < R , W > where CopyBufInto < BufReader < R > , W > : Unpin { }
16+ impl < ' a , R : AsyncRead , W > Unpin for CopyInto < ' a , R , W > where CopyBufInto < ' a , BufReader < R > , W > : Unpin { }
1717
18- impl < R : AsyncRead , W > CopyInto < R , W > {
19- unsafe_pinned ! ( inner: CopyBufInto <BufReader <R >, W >) ;
18+ impl < ' a , R : AsyncRead , W > CopyInto < ' a , R , W > {
19+ unsafe_pinned ! ( inner: CopyBufInto <' a , BufReader <R >, W >) ;
2020
21- pub ( super ) fn new ( reader : R , writer : W ) -> Self {
21+ pub ( super ) fn new ( reader : R , writer : & mut W ) -> CopyInto < ' _ , R , W > {
2222 CopyInto {
2323 inner : CopyBufInto :: new ( BufReader :: new ( reader) , writer) ,
2424 }
2525 }
2626}
2727
28- impl < R : AsyncRead , W : AsyncWrite > Future for CopyInto < R , W > {
28+ impl < R : AsyncRead , W : AsyncWrite + Unpin > Future for CopyInto < ' _ , R , W > {
2929 type Output = io:: Result < u64 > ;
3030
3131 fn poll ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
0 commit comments