Skip to content

Commit 7f3a954

Browse files
committed
refactor(clippy): make clippy happy
1 parent df25df4 commit 7f3a954

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wgpu-types/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ web-sys = { workspace = true, optional = true, default-features = false, feature
7474

7575
[dev-dependencies]
7676
exhaust.workspace = true
77+
hashbrown.workspace = true
7778
serde = { workspace = true, features = ["derive"] }
7879
serde_json.workspace = true

wgpu-types/src/texture/format.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,11 +2002,9 @@ pub struct TextureFormatFeatures {
20022002

20032003
#[cfg(test)]
20042004
mod tests {
2005-
use std::collections::HashSet;
2006-
2007-
use exhaust::Exhaust;
2008-
20092005
use super::*;
2006+
use exhaust::Exhaust;
2007+
use hashbrown::HashSet;
20102008

20112009
#[test]
20122010
fn texture_format_serialize() {
@@ -2729,12 +2727,10 @@ mod tests {
27292727
if let TextureFormat::Astc { .. } = format {
27302728
// can't add all `Astc` cases to the list above...
27312729
assert!(format.has_color_aspect(), "{:?} failed", format);
2730+
} else if valid_formats.contains(&format) {
2731+
assert!(format.has_color_aspect(), "{:?} failed", format);
27322732
} else {
2733-
if valid_formats.contains(&format) {
2734-
assert!(format.has_color_aspect(), "{:?} failed", format);
2735-
} else {
2736-
assert!(!format.has_color_aspect(), "{:?} failed", format);
2737-
}
2733+
assert!(!format.has_color_aspect(), "{:?} failed", format);
27382734
}
27392735
}
27402736
}

0 commit comments

Comments
 (0)