Make VertexFormat::size a const fn

This commit is contained in:
Imbris
2020-11-26 03:35:08 -05:00
parent fd99466867
commit 44a20d72ef

View File

@@ -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