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 {
1818 match s {
1919 "current_thread" => Ok ( RuntimeFlavor :: CurrentThread ) ,
2020 "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+ }
2226 "single_thread" => Err ( "The single threaded runtime flavor is called `current_thread`." . to_string ( ) ) ,
2327 "basic_scheduler" => Err ( "The `basic_scheduler` runtime flavor has been renamed to `current_thread`." . to_string ( ) ) ,
2428 "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