From 7ff0bd784ea39610e377fe18a606e7d8f4a06603 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Tue, 24 Jun 2025 12:10:03 -0400 Subject: [PATCH] fix!: remove `WebGpuError` impl. for `Request{Adapter,Device}Error` --- wgpu-core/src/instance.rs | 12 ------------ wgpu-types/src/lib.rs | 6 ------ 2 files changed, 18 deletions(-) diff --git a/wgpu-core/src/instance.rs b/wgpu-core/src/instance.rs index 2097a2171..962596a00 100644 --- a/wgpu-core/src/instance.rs +++ b/wgpu-core/src/instance.rs @@ -868,18 +868,6 @@ pub enum RequestDeviceError { UnsupportedFeature(wgt::Features), } -impl WebGpuError for RequestDeviceError { - fn webgpu_error_type(&self) -> ErrorType { - let e: &dyn WebGpuError = match self { - Self::Device(e) => e, - Self::LimitsExceeded(e) => e, - Self::TimestampNormalizerInitFailed(e) => e, - Self::UnsupportedFeature(_) => return ErrorType::Validation, - }; - e.webgpu_error_type() - } -} - #[derive(Clone, Debug, Error)] #[non_exhaustive] pub enum CreateSurfaceError { diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 0dd67a976..aa9b6a4d8 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -449,12 +449,6 @@ impl fmt::Display for RequestAdapterError { } } -impl error::WebGpuError for RequestAdapterError { - fn webgpu_error_type(&self) -> error::ErrorType { - error::ErrorType::Validation - } -} - /// Represents the sets of limits an adapter/device supports. /// /// We provide three different defaults.