diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 542e751a02..9d5b10f37b 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -2100,11 +2100,10 @@ impl TextureFormatFeatureFlags { /// A `Vec` of supported sample counts. pub fn supported_sample_counts(&self) -> Vec { - let all_possible_sample_counts: Vec = 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() } }