" add ETrackedPropertyError::into_result"

This commit is contained in:
Yuxuan Shui
2023-07-27 19:18:05 +01:00
parent f578e3a290
commit 5131a65a24

View File

@ -189,6 +189,16 @@ impl std::fmt::Debug for ETrackedPropertyError {
}
}
impl ETrackedPropertyError {
pub fn into_result(self) -> Result<(), Self> {
if self == ETrackedPropertyError::TrackedProp_Success {
Ok(())
} else {
Err(self)
}
}
}
impl EVRInitError {
pub fn into_result(self) -> Result<(), Self> {
if self == EVRInitError::VRInitError_None {