add const qualifier to as_raw and from_raw fns on enums

This commit is contained in:
TheEdward162 2020-04-11 20:24:41 +02:00 committed by Benjamin Saunders
parent 1f7dd9114d
commit a5e5e375b1
2 changed files with 182 additions and 182 deletions

File diff suppressed because it is too large Load diff

View file

@ -1300,8 +1300,8 @@ pub fn generate_enum<'a>(
#[doc = #khronos_link]
pub struct #ident(pub(crate) i32);
impl #ident {
pub fn from_raw(x: i32) -> Self { #ident(x) }
pub fn as_raw(self) -> i32 { self.0 }
pub const fn from_raw(x: i32) -> Self { #ident(x) }
pub const fn as_raw(self) -> i32 { self.0 }
}
#impl_block
};