Skip to content

Commit 9a43938

Browse files
chore: satisfy clippy::manual_is_power_of_two
This only fires with Rust 1.83 or newer, but we can preempt this case with our current MSRV.
1 parent e9b340d commit 9a43938

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wgpu-hal/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ impl FormatAspects {
16061606

16071607
/// Returns `true` if only one flag is set
16081608
pub fn is_one(&self) -> bool {
1609-
self.bits().count_ones() == 1
1609+
self.bits().is_power_of_two()
16101610
}
16111611

16121612
pub fn map(&self) -> wgt::TextureAspect {

0 commit comments

Comments
 (0)