File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,8 @@ impl<'model> Optimizer<'model> {
292
292
}
293
293
294
294
/// Optimize a branch of a graph (memoized)
295
- #[ async_recursion]
295
+ #[ cfg_attr( target_arch = "wasm32" , async_recursion( ?Send ) ) ]
296
+ #[ cfg_attr( not( target_arch = "wasm32" ) , async_recursion) ]
296
297
pub async fn optimize (
297
298
& mut self ,
298
299
node : Arc < Node < ' model > > ,
@@ -310,7 +311,8 @@ impl<'model> Optimizer<'model> {
310
311
311
312
/// Optimize a branch of a graph. Takes a node an attempts to form a chain of nodes with single (dynamic) inputs by
312
313
/// traversing towards the inputs.
313
- #[ async_recursion]
314
+ #[ cfg_attr( target_arch = "wasm32" , async_recursion( ?Send ) ) ]
315
+ #[ cfg_attr( not( target_arch = "wasm32" ) , async_recursion) ]
314
316
async fn optimize_actual (
315
317
& mut self ,
316
318
node : Arc < Node < ' model > > ,
You can’t perform that action at this time.
0 commit comments