Phase 9.78h: Minor cleanup — suppress deprecation warnings for legacy box_trait::ResultBox handling in VM to keep logs clean while migrating to boxes::ResultBox.

This commit is contained in:
Moe Charm
2025-08-26 00:32:33 +09:00
parent 320fbf0955
commit 63656c1d1b

View File

@ -1057,18 +1057,21 @@ impl VM {
} }
// ResultBox (box_trait::ResultBox - legacy) // ResultBox (box_trait::ResultBox - legacy)
if let Some(result_box_legacy) = box_value.as_any().downcast_ref::<crate::box_trait::ResultBox>() { {
match method { #[allow(deprecated)]
"is_ok" | "isOk" => { if let Some(result_box_legacy) = box_value.as_any().downcast_ref::<crate::box_trait::ResultBox>() {
return Ok(result_box_legacy.is_ok()); match method {
"is_ok" | "isOk" => {
return Ok(result_box_legacy.is_ok());
}
"get_value" | "getValue" => {
return Ok(result_box_legacy.get_value());
}
"get_error" | "getError" => {
return Ok(result_box_legacy.get_error());
}
_ => return Ok(Box::new(VoidBox::new())),
} }
"get_value" | "getValue" => {
return Ok(result_box_legacy.get_value());
}
"get_error" | "getError" => {
return Ok(result_box_legacy.get_error());
}
_ => return Ok(Box::new(VoidBox::new())),
} }
} }