38 lines
999 B
Rust
38 lines
999 B
Rust
pub(super) fn normalize_match3d_run_status(value: &str) -> &str {
|
|
match value {
|
|
"Running" => "running",
|
|
"Won" => "won",
|
|
"Failed" => "failed",
|
|
"Stopped" => "stopped",
|
|
_ => value,
|
|
}
|
|
}
|
|
|
|
pub(super) fn normalize_match3d_item_state(value: &str) -> &str {
|
|
match value {
|
|
"InBoard" => "in_board",
|
|
"InTray" => "in_tray",
|
|
"Cleared" => "cleared",
|
|
_ => value,
|
|
}
|
|
}
|
|
|
|
pub(super) fn normalize_match3d_failure_reason(value: &str) -> &str {
|
|
match value {
|
|
"TimeUp" => "time_up",
|
|
"TrayFull" => "tray_full",
|
|
_ => value,
|
|
}
|
|
}
|
|
|
|
pub(super) fn normalize_match3d_click_reject_reason(value: &str) -> &str {
|
|
match value {
|
|
"RejectedNotClickable" => "item_not_clickable",
|
|
"RejectedAlreadyMoved" => "item_not_in_board",
|
|
"RejectedTrayFull" => "tray_full",
|
|
"VersionConflict" => "snapshot_version_mismatch",
|
|
"RunFinished" => "run_not_active",
|
|
_ => value,
|
|
}
|
|
}
|