From 44a20d72efd968a20bc06f0bab56cb68258afdb0 Mon Sep 17 00:00:00 2001 From: Imbris Date: Thu, 26 Nov 2020 03:35:08 -0500 Subject: [PATCH] Make VertexFormat::size a const fn --- wgpu-types/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 7ccc1198b2..b150b53e13 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -1165,7 +1165,7 @@ pub enum VertexFormat { } impl VertexFormat { - pub fn size(&self) -> u64 { + pub const fn size(&self) -> u64 { match self { Self::Uchar2 | Self::Char2 | Self::Uchar2Norm | Self::Char2Norm => 2, Self::Uchar4