mirror of
https://github.com/MeiK2333/river.git
synced 2025-11-04 14:49:40 +08:00
add result: compile success
This commit is contained in:
parent
37e3017ff7
commit
77628dcf7e
@ -52,6 +52,7 @@ enum JudgeResult {
|
||||
CompileError = 6;
|
||||
PresentationError = 7;
|
||||
SystemError = 8;
|
||||
CompileSuccess = 9;
|
||||
}
|
||||
|
||||
enum JudgeStatus {
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user