1
0
forked from M-Labs/nac3

Compare commits

..

2 Commits

Author SHA1 Message Date
613159da39 cargo fmt 2024-09-12 17:32:11 +08:00
2d1cd95c2c artiq: support async rpcs 2024-09-12 16:33:38 +08:00

View File

@ -621,7 +621,7 @@ impl Nac3 {
let mut def = defs[id.0].write();
match &mut *def {
TopLevelDef::Function { codegen_callback, .. } => {
*codegen_callback = Some(rpc_codegen_callback(*is_async));
*codegen_callback = Some(rpc_codegen_callback(*is_async).clone());
}
TopLevelDef::Class { methods, .. } => {
let (class_def, method_name) = class_data.as_ref().unwrap();
@ -632,7 +632,7 @@ impl Nac3 {
if let TopLevelDef::Function { codegen_callback, .. } =
&mut *defs[id.0].write()
{
*codegen_callback = Some(rpc_codegen_callback(*is_async));
*codegen_callback = Some(rpc_codegen_callback(*is_async).clone());
store_fun
.call1(
py,