bevy_render: fix clippy on wasm (#19872)

# Objective

- bevy_render has unfulfilled expected clippy lints in wasm

## Solution

- Don't expect them in wasm

## Testing

`cargo clippy --target wasm32-unknown-unknown -p bevy_render --no-deps
-- -D warnings`
This commit is contained in:
François Mockers 2025-06-30 00:09:37 +02:00 committed by GitHub
parent a8bb208ed3
commit 01eff3ea93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 9 deletions

View File

@ -392,9 +392,12 @@ where
}
/// The buffer of GPU preprocessing work items for a single view.
#[expect(
clippy::large_enum_variant,
reason = "See https://github.com/bevyengine/bevy/issues/19220"
#[cfg_attr(
not(target_arch = "wasm32"),
expect(
clippy::large_enum_variant,
reason = "See https://github.com/bevyengine/bevy/issues/19220"
)
)]
pub enum PreprocessWorkItemBuffers {
/// The work items we use if we aren't using indirect drawing.

View File

@ -80,9 +80,12 @@ pub struct CachedPipeline {
}
/// State of a cached pipeline inserted into a [`PipelineCache`].
#[expect(
clippy::large_enum_variant,
reason = "See https://github.com/bevyengine/bevy/issues/19220"
#[cfg_attr(
not(target_arch = "wasm32"),
expect(
clippy::large_enum_variant,
reason = "See https://github.com/bevyengine/bevy/issues/19220"
)
)]
#[derive(Debug)]
pub enum CachedPipelineState {
@ -1114,9 +1117,12 @@ fn create_pipeline_task(
}
/// Type of error returned by a [`PipelineCache`] when the creation of a GPU pipeline object failed.
#[expect(
clippy::large_enum_variant,
reason = "See https://github.com/bevyengine/bevy/issues/19220"
#[cfg_attr(
not(target_arch = "wasm32"),
expect(
clippy::large_enum_variant,
reason = "See https://github.com/bevyengine/bevy/issues/19220"
)
)]
#[derive(Error, Debug)]
pub enum PipelineCacheError {