@@ -94,7 +94,7 @@ use core::pin::Pin;
9494use core:: ptr;
9595use core:: task:: { Context , Poll , Waker } ;
9696
97- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
97+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
9898use {
9999 parking:: { Parker , Unparker } ,
100100 std:: time:: { Duration , Instant } ,
@@ -720,7 +720,7 @@ impl<T> EventListener<T> {
720720 /// // Receive the notification.
721721 /// listener.as_mut().wait();
722722 /// ```
723- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
723+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
724724 pub fn wait ( self : Pin < & mut Self > ) -> T {
725725 self . listener ( ) . wait_internal ( None ) . unwrap ( )
726726 }
@@ -741,7 +741,7 @@ impl<T> EventListener<T> {
741741 /// // There are no notification so this times out.
742742 /// assert!(listener.as_mut().wait_timeout(Duration::from_secs(1)).is_none());
743743 /// ```
744- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
744+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
745745 pub fn wait_timeout ( self : Pin < & mut Self > , timeout : Duration ) -> Option < T > {
746746 self . listener ( )
747747 . wait_internal ( Instant :: now ( ) . checked_add ( timeout) )
@@ -763,7 +763,7 @@ impl<T> EventListener<T> {
763763 /// // There are no notification so this times out.
764764 /// assert!(listener.as_mut().wait_deadline(Instant::now() + Duration::from_secs(1)).is_none());
765765 /// ```
766- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
766+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
767767 pub fn wait_deadline ( self : Pin < & mut Self > , deadline : Instant ) -> Option < T > {
768768 self . listener ( ) . wait_internal ( Some ( deadline) )
769769 }
@@ -882,7 +882,7 @@ impl<T, B: Borrow<Inner<T>> + Unpin> Listener<T, B> {
882882 }
883883
884884 /// Wait until the provided deadline.
885- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
885+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
886886 fn wait_internal ( mut self : Pin < & mut Self > , deadline : Option < Instant > ) -> Option < T > {
887887 use std:: cell:: RefCell ;
888888
@@ -916,7 +916,7 @@ impl<T, B: Borrow<Inner<T>> + Unpin> Listener<T, B> {
916916 }
917917
918918 /// Wait until the provided deadline using the specified parker/unparker pair.
919- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
919+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
920920 fn wait_with_parker (
921921 self : Pin < & mut Self > ,
922922 deadline : Option < Instant > ,
@@ -1078,23 +1078,23 @@ enum Task {
10781078 Waker ( Waker ) ,
10791079
10801080 /// An unparker that wakes up a thread.
1081- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
1081+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
10821082 Unparker ( Unparker ) ,
10831083}
10841084
10851085impl Task {
10861086 fn as_task_ref ( & self ) -> TaskRef < ' _ > {
10871087 match self {
10881088 Self :: Waker ( waker) => TaskRef :: Waker ( waker) ,
1089- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
1089+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
10901090 Self :: Unparker ( unparker) => TaskRef :: Unparker ( unparker) ,
10911091 }
10921092 }
10931093
10941094 fn wake ( self ) {
10951095 match self {
10961096 Self :: Waker ( waker) => waker. wake ( ) ,
1097- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
1097+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
10981098 Self :: Unparker ( unparker) => {
10991099 unparker. unpark ( ) ;
11001100 }
@@ -1115,7 +1115,7 @@ enum TaskRef<'a> {
11151115 Waker ( & ' a Waker ) ,
11161116
11171117 /// An unparker that wakes up a thread.
1118- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
1118+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
11191119 Unparker ( & ' a Unparker ) ,
11201120}
11211121
@@ -1125,7 +1125,7 @@ impl TaskRef<'_> {
11251125 fn will_wake ( self , other : Self ) -> bool {
11261126 match ( self , other) {
11271127 ( Self :: Waker ( a) , Self :: Waker ( b) ) => a. will_wake ( b) ,
1128- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
1128+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
11291129 ( Self :: Unparker ( _) , Self :: Unparker ( _) ) => {
11301130 // TODO: Use unreleased will_unpark API.
11311131 false
@@ -1138,7 +1138,7 @@ impl TaskRef<'_> {
11381138 fn into_task ( self ) -> Task {
11391139 match self {
11401140 Self :: Waker ( waker) => Task :: Waker ( waker. clone ( ) ) ,
1141- #[ cfg( all( feature = "std" , not( target_family = "wasm" ) , ) ) ]
1141+ #[ cfg( all( feature = "std" , not( target_family = "wasm" ) ) ) ]
11421142 Self :: Unparker ( unparker) => Task :: Unparker ( unparker. clone ( ) ) ,
11431143 }
11441144 }
0 commit comments