diff --git a/proto/river.proto b/proto/river.proto index 993d519..3c51a7f 100644 --- a/proto/river.proto +++ b/proto/river.proto @@ -52,6 +52,7 @@ enum JudgeResult { CompileError = 6; PresentationError = 7; SystemError = 8; + CompileSuccess = 9; } enum JudgeStatus { diff --git a/src/judger.rs b/src/judger.rs index a3eadee..efb49a8 100644 --- a/src/judger.rs +++ b/src/judger.rs @@ -158,7 +158,7 @@ pub async fn compile( }; resp.state = Some(State::Result(JudgeResult::CompileError as i32)); } else { - resp.state = Some(State::Result(JudgeResult::Accepted as i32)); + resp.state = Some(State::Result(JudgeResult::CompileSuccess as i32)); } Ok(resp) } diff --git a/src/main.rs b/src/main.rs index 03d6c67..4764be1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -87,7 +87,7 @@ impl River for RiverService { // 如果通过了编译,则标记为成功 if let Some(Data::CompileData(_)) = &req.data { if let Some(State::Result(rst)) = result.state { - if rst == JudgeResult::Accepted as i32 { + if rst == JudgeResult::CompileSuccess as i32 { compile_success = true; } }