Implement conversion between u32 and Group

This commit is contained in:
Sébastien Crozet
2022-10-25 18:11:26 +02:00
parent b243e0a758
commit 8fd3e61c92

View File

@@ -150,3 +150,17 @@ bitflags! {
const NONE = 0;
}
}
impl From<u32> for Group {
#[inline]
fn from(val: u32) -> Self {
unsafe { Self::from_bits_unchecked(val) }
}
}
impl From<Group> for u32 {
#[inline]
fn from(val: Group) -> Self {
val.bits()
}
}