flags_def!($name, u32);
};
($name:ident, $ty:ty) => {
- #[derive(PartialEq, Hash, Debug)]
+ #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default)]
+ #[repr(transparent)]
pub struct $name($ty);
impl $name {
}
}
- impl Clone for $name {
- fn clone(&self) -> Self {
- *self
- }
- }
-
- impl Copy for $name {}
-
- impl Default for $name {
- fn default() -> Self {
- Self(0)
- }
- }
-
- impl Eq for $name {}
-
impl std::ops::BitOr for $name {
type Output = Self;
fn bitor(self, rhs: Self) -> Self::Output {