diff --git a/judger/src/worker/mod.rs b/judger/src/worker/mod.rs index 2bfdeab..07477e1 100644 --- a/judger/src/worker/mod.rs +++ b/judger/src/worker/mod.rs @@ -142,8 +142,8 @@ impl JudgeWorker { } Err(anyhow::anyhow!("Failed to new builder result: {:?}", e)) }); - if new_builder_result.is_err() { - return new_builder_result.unwrap_err(); + if let Err(result) = new_builder_result { + return result } let builder = new_builder_result.expect("builder creater error"); log::debug!("Builder created: {:?}", builder);