mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-01-15 01:08:05 -05:00
Make VertexFormat::size a const fn
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user