File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,10 @@ pub enum PreferWorkerKind {
37
37
38
38
/// Execute something with a worker system.
39
39
pub fn with_worker < T > ( prefer : PreferWorkerKind , f : impl FnOnce ( & mut dyn Worker ) -> T ) -> T {
40
- #[ cfg( any( target_arch = "asmjs" , target_arch = "wasm32" ) ) ]
41
- {
42
- return self :: immediate:: with_immediate ( f) ;
43
- }
44
40
match prefer {
45
- #[ cfg( feature = "rayon" ) ]
41
+ #[ cfg( all ( not ( any ( target_arch = "asmjs" , target_arch = "wasm32" ) ) , feature = "rayon" ) ) ]
46
42
PreferWorkerKind :: Multithreaded => self :: rayon:: with_rayon ( f) ,
43
+ #[ cfg( not( any( target_arch = "asmjs" , target_arch = "wasm32" ) ) ) ]
47
44
PreferWorkerKind :: Multithreaded => self :: multithreaded:: with_multithreading ( f) ,
48
45
_ => self :: immediate:: with_immediate ( f) ,
49
46
}
You can’t perform that action at this time.
0 commit comments