File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -138,22 +138,17 @@ pub async fn yield_now() {
138
138
139
139
#[ track_caller]
140
140
pub fn test_block_on < F : Future > ( f : F ) -> F :: Output {
141
- #[ cfg( feature = "_rt-tokio" ) ]
142
- {
143
- if rt_tokio:: available ( ) {
144
- return tokio:: runtime:: Builder :: new_current_thread ( )
145
- . enable_all ( )
146
- . build ( )
147
- . expect ( "failed to start Tokio runtime" )
148
- . block_on ( f) ;
149
- }
150
- }
151
-
152
141
cfg_if ! {
153
142
if #[ cfg( feature = "_rt-async-std" ) ] {
154
143
async_std:: task:: block_on( f)
155
144
} else if #[ cfg( feature = "_rt-smol" ) ] {
156
145
smol:: block_on( f)
146
+ } else if #[ cfg( feature = "_rt-tokio" ) ] {
147
+ tokio:: runtime:: Builder :: new_current_thread( )
148
+ . enable_all( )
149
+ . build( )
150
+ . expect( "failed to start Tokio runtime" )
151
+ . block_on( f)
157
152
} else {
158
153
missing_rt( f)
159
154
}
You can’t perform that action at this time.
0 commit comments