mirror of
https://github.com/mii443/openvr-sys.git
synced 2025-08-22 16:15:36 +00:00
" add ETrackedPropertyError::into_result"
This commit is contained in:
10
src/lib.rs
10
src/lib.rs
@ -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 {
|
||||
|
Reference in New Issue
Block a user