Skip to content

Commit

Permalink
Make VertexFormat::size a const fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Imberflur committed Nov 26, 2020
1 parent fd99466 commit 44a20d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44a20d7

Please sign in to comment.