File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ blocking = { version = "0.5.2", optional = true }
86
86
futures-lite = { version = " 0.1.8" , optional = true }
87
87
88
88
[target .'cfg(target_arch = "wasm32")' .dependencies ]
89
- futures-timer = { version = " 3.0.2" , optional = true , features = [" wasm-bindgen" ] }
89
+ futures-timer = { version = " 3.0.2" , features = [" wasm-bindgen" ] }
90
90
wasm-bindgen-futures = { version = " 0.4.10" , optional = true }
91
91
futures-channel = { version = " 0.3.4" , optional = true }
92
92
Original file line number Diff line number Diff line change @@ -78,7 +78,17 @@ impl<T> Drop for JoinHandle<T> {
78
78
impl < T > Future for JoinHandle < T > {
79
79
type Output = T ;
80
80
81
+ #[ cfg( not( target_os = "unknown" ) ) ]
81
82
fn poll ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
82
83
Pin :: new ( & mut self . handle . as_mut ( ) . unwrap ( ) ) . poll ( cx)
83
84
}
85
+
86
+ #[ cfg( target_arch = "wasm32" ) ]
87
+ fn poll ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < Self :: Output > {
88
+ match Pin :: new ( & mut self . handle . as_mut ( ) . unwrap ( ) ) . poll ( cx) {
89
+ Poll :: Ready ( Ok ( t) ) => Poll :: Ready ( t) ,
90
+ Poll :: Ready ( Err ( _) ) => unreachable ! ( "channel must not be canceled" ) ,
91
+ Poll :: Pending => Poll :: Pending ,
92
+ }
93
+ }
84
94
}
You can’t perform that action at this time.
0 commit comments