Skip to content

Commit 01eff3e

Browse files
authored
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`
1 parent a8bb208 commit 01eff3e

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

crates/bevy_render/src/batching/gpu_preprocessing.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,12 @@ where
392392
}
393393

394394
/// The buffer of GPU preprocessing work items for a single view.
395-
#[expect(
396-
clippy::large_enum_variant,
397-
reason = "See https://github.com/bevyengine/bevy/issues/19220"
395+
#[cfg_attr(
396+
not(target_arch = "wasm32"),
397+
expect(
398+
clippy::large_enum_variant,
399+
reason = "See https://github.com/bevyengine/bevy/issues/19220"
400+
)
398401
)]
399402
pub enum PreprocessWorkItemBuffers {
400403
/// The work items we use if we aren't using indirect drawing.

crates/bevy_render/src/render_resource/pipeline_cache.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,12 @@ pub struct CachedPipeline {
8080
}
8181

8282
/// State of a cached pipeline inserted into a [`PipelineCache`].
83-
#[expect(
84-
clippy::large_enum_variant,
85-
reason = "See https://github.com/bevyengine/bevy/issues/19220"
83+
#[cfg_attr(
84+
not(target_arch = "wasm32"),
85+
expect(
86+
clippy::large_enum_variant,
87+
reason = "See https://github.com/bevyengine/bevy/issues/19220"
88+
)
8689
)]
8790
#[derive(Debug)]
8891
pub enum CachedPipelineState {
@@ -1114,9 +1117,12 @@ fn create_pipeline_task(
11141117
}
11151118

11161119
/// Type of error returned by a [`PipelineCache`] when the creation of a GPU pipeline object failed.
1117-
#[expect(
1118-
clippy::large_enum_variant,
1119-
reason = "See https://github.com/bevyengine/bevy/issues/19220"
1120+
#[cfg_attr(
1121+
not(target_arch = "wasm32"),
1122+
expect(
1123+
clippy::large_enum_variant,
1124+
reason = "See https://github.com/bevyengine/bevy/issues/19220"
1125+
)
11201126
)]
11211127
#[derive(Error, Debug)]
11221128
pub enum PipelineCacheError {

0 commit comments

Comments
 (0)