File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 1- use cfg_if:: cfg_if;
2-
31use crate :: stream:: { FromStream , IntoStream , Stream } ;
42
53use std:: pin:: Pin ;
64
7- cfg_if ! {
8- if #[ cfg( feature = "docs" ) ] {
9- #[ doc( hidden) ]
10- pub struct DynFuture <' a, T >( std:: marker:: PhantomData <& ' a T >) ;
11-
12- macro_rules! dyn_ret {
13- ( $a: lifetime, $o: ty) => ( DynFuture <$a, $o>) ;
14- }
15- } else {
16- macro_rules! dyn_ret {
17- ( $a: lifetime, $o: ty) => ( Pin <Box <dyn core:: future:: Future <Output = $o> + Send + ' a>>)
18- }
19- }
20- }
21-
225impl < T : Unpin + Sized + Send > FromStream < T > for Vec < T > {
236 #[ inline]
24- fn from_stream < ' a , S : IntoStream < Item = T > > ( stream : S ) -> dyn_ret ! ( ' a, Self )
7+ fn from_stream < ' a , S : IntoStream < Item = T > > (
8+ stream : S ,
9+ ) -> Pin < Box < dyn core:: future:: Future < Output = Self > + Send + ' a > >
2510 where
2611 <S as IntoStream >:: IntoStream : Send + ' a ,
2712 {
You can’t perform that action at this time.
0 commit comments