refactor(deno): impl From<wgpu_types::DeviceLostReason> for GPUDeviceLostReason

This commit is contained in:
Erich Gubler 2025-06-24 12:48:13 -04:00
parent d1c40f3c68
commit d8d1af24b6

View File

@ -841,6 +841,15 @@ pub enum GPUDeviceLostReason {
Destroyed,
}
impl From<wgpu_types::DeviceLostReason> for GPUDeviceLostReason {
fn from(value: wgpu_types::DeviceLostReason) -> Self {
match value {
wgpu_types::DeviceLostReason::Unknown => Self::Unknown,
wgpu_types::DeviceLostReason::Destroyed => Self::Destroyed,
}
}
}
#[derive(Default)]
pub struct GPUDeviceLostInfo {
pub reason: GPUDeviceLostReason,