Skip to content

Commit b7e7d7c

Browse files
Fix clippy::manual_contains lints (#7384)
1 parent ebf8752 commit b7e7d7c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wgpu-core/src/validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ impl Interface {
11911191
];
11921192
let total_invocations = entry_point.workgroup_size.iter().product::<u32>();
11931193

1194-
if entry_point.workgroup_size.iter().any(|&s| s == 0)
1194+
if entry_point.workgroup_size.contains(&0)
11951195
|| total_invocations > self.limits.max_compute_invocations_per_workgroup
11961196
|| entry_point.workgroup_size[0] > max_workgroup_size_limits[0]
11971197
|| entry_point.workgroup_size[1] > max_workgroup_size_limits[1]

wgpu-hal/src/gles/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ impl crate::CommandEncoder for super::CommandEncoder {
11991199

12001200
unsafe fn dispatch(&mut self, count: [u32; 3]) {
12011201
// Empty dispatches are invalid in OpenGL, but valid in WebGPU.
1202-
if count.iter().any(|&c| c == 0) {
1202+
if count.contains(&0) {
12031203
return;
12041204
}
12051205
self.cmd_buffer.commands.push(C::Dispatch(count));

0 commit comments

Comments
 (0)