diff --git a/.clippy.toml b/.clippy.toml deleted file mode 100644 index 1fdcf3e5ac6..00000000000 --- a/.clippy.toml +++ /dev/null @@ -1 +0,0 @@ -large-error-threshold = 225 # bytes diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 7a7e0be4c99..494fa41b7a9 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -80,10 +80,7 @@ pub(crate) struct RenderPassContext { #[derive(Clone, Debug, Error)] pub enum RenderPassCompatibilityError { #[error("Incompatible color attachment: the renderpass expected {0:?} but was given {1:?}")] - IncompatibleColorAttachment( - ArrayVec, { hal::MAX_COLOR_ATTACHMENTS }>, - ArrayVec, { hal::MAX_COLOR_ATTACHMENTS }>, - ), + IncompatibleColorAttachment(Vec>, Vec>), #[error( "Incompatible depth-stencil attachment: the renderpass expected {0:?} but was given {1:?}" )] @@ -102,8 +99,8 @@ impl RenderPassContext { ) -> Result<(), RenderPassCompatibilityError> { if self.attachments.colors != other.attachments.colors { return Err(RenderPassCompatibilityError::IncompatibleColorAttachment( - self.attachments.colors.clone(), - other.attachments.colors.clone(), + self.attachments.colors.iter().cloned().collect(), + other.attachments.colors.iter().cloned().collect(), )); } if self.attachments.depth_stencil != other.attachments.depth_stencil { @@ -1245,7 +1242,7 @@ impl Device { pipeline::CreateShaderModuleError::Parsing(pipeline::ShaderError { source: code.to_string(), label: desc.label.as_ref().map(|l| l.to_string()), - inner, + inner: Box::new(inner), }) })?; (Cow::Owned(module), code.into_owned()) @@ -1308,7 +1305,7 @@ impl Device { pipeline::CreateShaderModuleError::Validation(pipeline::ShaderError { source, label: desc.label.as_ref().map(|l| l.to_string()), - inner, + inner: Box::new(inner), }) })?; let interface = diff --git a/wgpu-core/src/pipeline.rs b/wgpu-core/src/pipeline.rs index 667b8b96ed2..5c091e1d96d 100644 --- a/wgpu-core/src/pipeline.rs +++ b/wgpu-core/src/pipeline.rs @@ -66,7 +66,7 @@ impl Resource for ShaderModule { pub struct ShaderError { pub source: String, pub label: Option, - pub inner: E, + pub inner: Box, } #[cfg(feature = "wgsl")] impl fmt::Display for ShaderError {