add const qualifier to as_raw
and from_raw
fns on enums
This commit is contained in:
parent
1f7dd9114d
commit
a5e5e375b1
2 changed files with 182 additions and 182 deletions
360
ash/src/vk.rs
360
ash/src/vk.rs
File diff suppressed because it is too large
Load diff
|
@ -1300,8 +1300,8 @@ pub fn generate_enum<'a>(
|
||||||
#[doc = #khronos_link]
|
#[doc = #khronos_link]
|
||||||
pub struct #ident(pub(crate) i32);
|
pub struct #ident(pub(crate) i32);
|
||||||
impl #ident {
|
impl #ident {
|
||||||
pub fn from_raw(x: i32) -> Self { #ident(x) }
|
pub const fn from_raw(x: i32) -> Self { #ident(x) }
|
||||||
pub fn as_raw(self) -> i32 { self.0 }
|
pub const fn as_raw(self) -> i32 { self.0 }
|
||||||
}
|
}
|
||||||
#impl_block
|
#impl_block
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue