File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,10 @@ futures-timer = { version = "3.0.2", optional = true }
8080surf = { version = " 1.0.3" , optional = true }
8181
8282[target .'cfg(not(target_os = "unknown"))' .dependencies ]
83- async-executor = { version = " 0.1.2 " , features = [ " async-io " ] , optional = true }
84- async-io = { version = " 0.1.8 " , optional = true }
85- blocking = { version = " 0.5.2 " , optional = true }
86- futures-lite = { version = " 0.1.8 " , optional = true }
83+ async-executor = { version = " 0.2.0 " , optional = true }
84+ async-io = { version = " 0.2.1 " , optional = true }
85+ blocking = { version = " 0.6.0 " , optional = true }
86+ futures-lite = { version = " 1.0.0 " , optional = true }
8787
8888[target .'cfg(target_arch = "wasm32")' .dependencies ]
8989futures-timer = { version = " 3.0.2" , optional = true , features = [" wasm-bindgen" ] }
Original file line number Diff line number Diff line change @@ -28,14 +28,14 @@ pub(crate) fn run<F, T>(future: F) -> T
2828where
2929 F : Future < Output = T > ,
3030{
31- EXECUTOR . with ( |executor| enter ( || GLOBAL_EXECUTOR . enter ( || executor. borrow ( ) . run ( future) ) ) )
31+ EXECUTOR . with ( |executor| enter ( || async_io :: block_on ( executor. borrow ( ) . run ( future) ) ) )
3232}
3333
3434pub ( crate ) fn run_global < F , T > ( future : F ) -> T
3535where
3636 F : Future < Output = T > ,
3737{
38- enter ( || GLOBAL_EXECUTOR . run ( future) )
38+ enter ( || async_io :: block_on ( GLOBAL_EXECUTOR . run ( future) ) )
3939}
4040
4141/// Enters the tokio context if the `tokio` feature is enabled.
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ pub(crate) fn timer_after(dur: std::time::Duration) -> timer::Timer {
6969 #[ cfg( all( not( target_os = "unknown" ) , feature = "default" ) ) ]
7070 once_cell:: sync:: Lazy :: force ( & crate :: rt:: RUNTIME ) ;
7171
72- Timer :: new ( dur)
72+ Timer :: after ( dur)
7373}
7474
7575#[ cfg( any(
@@ -84,7 +84,7 @@ mod timer {
8484 pub ( crate ) struct Timer ( futures_timer:: Delay ) ;
8585
8686 impl Timer {
87- pub ( crate ) fn new ( dur : std:: time:: Duration ) -> Self {
87+ pub ( crate ) fn after ( dur : std:: time:: Duration ) -> Self {
8888 Timer ( futures_timer:: Delay :: new ( dur) )
8989 }
9090 }
You can’t perform that action at this time.
0 commit comments