File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,11 @@ impl RuntimeFlavor {
18
18
match s {
19
19
"current_thread" => Ok ( RuntimeFlavor :: CurrentThread ) ,
20
20
"multi_thread" => Ok ( RuntimeFlavor :: Threaded ) ,
21
- "local" => Ok ( RuntimeFlavor :: Local ) ,
21
+ "local" => if cfg ! ( tokio_unstable) {
22
+ Ok ( RuntimeFlavor :: Local )
23
+ } else {
24
+ Err ( "The local runtime flavor is only available when `tokio_unstable` is set." . to_string ( ) )
25
+ }
22
26
"single_thread" => Err ( "The single threaded runtime flavor is called `current_thread`." . to_string ( ) ) ,
23
27
"basic_scheduler" => Err ( "The `basic_scheduler` runtime flavor has been renamed to `current_thread`." . to_string ( ) ) ,
24
28
"threaded_scheduler" => Err ( "The `threaded_scheduler` runtime flavor has been renamed to `multi_thread`." . to_string ( ) ) ,
You can’t perform that action at this time.
0 commit comments