From 4bb0d71cf3a981ec0727977cd33345fa99b8066e Mon Sep 17 00:00:00 2001 From: Qiwei Yang Date: Sun, 5 May 2024 09:22:23 +0800 Subject: [PATCH] fix: code style --- executor/src/task.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/executor/src/task.rs b/executor/src/task.rs index a1296c70..83362816 100644 --- a/executor/src/task.rs +++ b/executor/src/task.rs @@ -133,7 +133,9 @@ pub async fn run_task(task: TaskCall, js: crate::JsCallback) -> Result = vec![]; for (call, params) in task.calls { - let vm_res = runtime_call::run(runtime_call::Config { + log::trace!("Calling {}", call); + + let vm = runtime_call::run(runtime_call::Config { virtual_machine: vm_proto.clone(), function_to_call: call.as_str(), parameter: params.into_iter().map(|x| x.0), @@ -142,13 +144,13 @@ pub async fn run_task(task: TaskCall, js: crate::JsCallback) -> Result vm, + // ignore host_vm_proto since it doesn't provide any info + Err((start_err, _host_vm_proto)) => { + return Ok(TaskResponse::Error(start_err.to_string())); + } + }; let res = loop { vm = match vm {