File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,24 @@ mod if_std {
270270 deref_async_read ! ( ) ;
271271 }
272272
273+ impl < ' a , T : ?Sized + AsyncRead > AsyncRead for Pin < & ' a mut T > {
274+ unsafe fn initializer ( & self ) -> Initializer {
275+ ( * * self ) . initializer ( )
276+ }
277+
278+ fn poll_read ( mut self : Pin < & mut Self > , waker : & Waker , buf : & mut [ u8 ] )
279+ -> Poll < Result < usize > >
280+ {
281+ T :: poll_read ( ( * self ) . as_mut ( ) , waker, buf)
282+ }
283+
284+ fn poll_vectored_read ( mut self : Pin < & mut Self > , waker : & Waker , vec : & mut [ & mut IoVec ] )
285+ -> Poll < Result < usize > >
286+ {
287+ T :: poll_vectored_read ( ( * self ) . as_mut ( ) , waker, vec)
288+ }
289+ }
290+
273291 /// `unsafe` because the `StdIo::Read` type must not access the buffer
274292 /// before reading data into it.
275293 macro_rules! unsafe_delegate_async_read_to_stdio {
You can’t perform that action at this time.
0 commit comments