finish command before moving into respond_async

This commit is contained in:
chip reed 2021-04-30 23:25:19 -07:00
parent df587701f7
commit 4651bed5bf
No known key found for this signature in database
GPG Key ID: 6F4979B1F493E139

View File

@ -112,7 +112,8 @@ pub fn generate_command(function: ItemFn) -> TokenStream {
#vis fn #fn_wrapper<P: ::tauri::Params>(message: ::tauri::InvokeMessage<P>) {
use ::tauri::command::FromCommand;
#invoke_args
message.respond_async(async move { #return_value })
let result = #return_value;
message.respond_async(::std::future::ready(result))
}
}
}