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)]
#[derive(FromBits, PartialEq, Eq, Clone, Copy, Debug)]
#[derive(FromBits, PartialEq, Eq, Clone, Copy, Debug, Default)]
pub enum Priority {
#[default]
P0 = 0,
P1 = 1,
P2 = 2,

View file

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