Derive default to make bilge 2.0 happy (and may as well)

This commit is contained in:
Gwilym Inzani 2023-08-06 20:46:43 +01:00
parent 24070fdd18
commit 46c9ebb855
2 changed files with 8 additions and 4 deletions

View file

@ -161,8 +161,9 @@ pub fn busy_wait_for_vblank() {
} }
#[bitsize(2)] #[bitsize(2)]
#[derive(FromBits, PartialEq, Eq, Clone, Copy, Debug)] #[derive(FromBits, PartialEq, Eq, Clone, Copy, Debug, Default)]
pub enum Priority { pub enum Priority {
#[default]
P0 = 0, P0 = 0,
P1 = 1, P1 = 1,
P2 = 2, P2 = 2,

View file

@ -135,25 +135,28 @@ impl Attributes {
} }
#[bitsize(2)] #[bitsize(2)]
#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq)] #[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq, Default)]
enum ObjectMode { enum ObjectMode {
Normal, Normal,
Affine, Affine,
#[default]
Disabled, Disabled,
AffineDouble, AffineDouble,
} }
#[bitsize(2)] #[bitsize(2)]
#[derive(TryFromBits, Clone, Copy, Debug, PartialEq, Eq)] #[derive(TryFromBits, Clone, Copy, Debug, PartialEq, Eq, Default)]
enum GraphicsMode { enum GraphicsMode {
#[default]
Normal, Normal,
AlphaBlending, AlphaBlending,
Window, Window,
} }
#[bitsize(1)] #[bitsize(1)]
#[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq)] #[derive(FromBits, Clone, Copy, Debug, PartialEq, Eq, Default)]
enum ColourMode { enum ColourMode {
#[default]
Four, Four,
Eight, Eight,
} }