Skip to content

Commit

Permalink
Update wgpu-types/src/lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Oct 26, 2023
1 parent 4bef545 commit e2ac330
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2100,11 +2100,10 @@ impl TextureFormatFeatureFlags {

/// A `Vec` of supported sample counts.
pub fn supported_sample_counts(&self) -> Vec<u32> {
let all_possible_sample_counts: Vec<u32> = vec![1, 2, 4, 8, 16];
let all_possible_sample_counts: [u32; 5] = [1, 2, 4, 8, 16];
all_possible_sample_counts
.iter()
.filter(|sc| self.sample_count_supported(**sc))
.cloned()
.into_iter()
.filter(|&sc| self.sample_count_supported(sc))
.collect()
}
}
Expand Down

0 comments on commit e2ac330

Please sign in to comment.