From e2ac33025ceaf73537c7465de1f7fee8627b51ff Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Thu, 26 Oct 2023 00:44:06 -0400 Subject: [PATCH] Update wgpu-types/src/lib.rs --- wgpu-types/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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() } }