@@ -8,7 +8,6 @@ use alloc::sync::{Arc, Weak};
8
8
use core:: {
9
9
cell:: Cell ,
10
10
future:: Future ,
11
- marker:: PhantomData ,
12
11
pin:: Pin ,
13
12
sync:: atomic:: { AtomicBool , Ordering } ,
14
13
task:: { Context , Poll }
@@ -47,7 +46,7 @@ pub struct Yielder<T> {
47
46
}
48
47
49
48
impl < T > Yielder < T > {
50
- pub fn r#yield ( & self , value : T ) -> YieldFut < ' _ , T > {
49
+ pub fn r#yield ( & self , value : T ) -> YieldFut < T > {
51
50
#[ cold]
52
51
fn invalid_usage ( ) -> ! {
53
52
panic ! ( "attempted to use async_stream_lite yielder outside of stream context or across threads" )
@@ -62,22 +61,21 @@ impl<T> Yielder<T> {
62
61
63
62
store. cell . replace ( Some ( value) ) ;
64
63
65
- YieldFut { store, _p : PhantomData }
64
+ YieldFut { store }
66
65
}
67
66
}
68
67
69
68
/// Future returned by an [`AsyncStream`]'s yield function.
70
69
///
71
70
/// This future must be `.await`ed inside the generator in order for the item to be yielded by the stream.
72
71
#[ must_use = "stream will not yield this item unless the future returned by yield is awaited" ]
73
- pub struct YieldFut < ' y , T > {
72
+ pub struct YieldFut < T > {
74
73
store : Arc < SharedStore < T > > ,
75
- _p : PhantomData < & ' y ( ) >
76
74
}
77
75
78
- impl < T > Unpin for YieldFut < ' _ , T > { }
76
+ impl < T > Unpin for YieldFut < T > { }
79
77
80
- impl < T > Future for YieldFut < ' _ , T > {
78
+ impl < T > Future for YieldFut < T > {
81
79
type Output = ( ) ;
82
80
83
81
fn poll ( self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
0 commit comments