We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCDColorIs should be const_trait
playdate/api/color/src/lib.rs
Line 116 in ea28ed4
fn XOR() -> Self { LCDSolidColor::kColorXOR } } pub trait LCDColorConst { const WHITE: Self; const BLACK: Self; const CLEAR: Self; const XOR: Self; } impl LCDColorConst for LCDColor { const WHITE: Self = LCDSolidColor::kColorWhite as Self; const BLACK: Self = LCDSolidColor::kColorBlack as Self; const CLEAR: Self = LCDSolidColor::kColorClear as Self; const XOR: Self = LCDSolidColor::kColorXOR as Self; } impl LCDColorConst for LCDSolidColor { const WHITE: Self = LCDSolidColor::kColorWhite as Self; const BLACK: Self = LCDSolidColor::kColorBlack as Self; const CLEAR: Self = LCDSolidColor::kColorClear as Self; const XOR: Self = LCDSolidColor::kColorXOR as Self; } // TODO: LCDColorIs should be const_trait pub trait LCDColorIs { fn is_solid(&self) -> bool; fn is_pattern(&self) -> bool; } impl LCDColorIs for LCDColor { fn is_solid(&self) -> bool { let color = *self as usize; color >= LCDSolidColor::kColorBlack as _ && color <= LCDSolidColor::kColorXOR as _
The text was updated successfully, but these errors were encountered:
boozook
No branches or pull requests
LCDColorIs should be const_trait
playdate/api/color/src/lib.rs
Line 116 in ea28ed4
Source of this issue
The text was updated successfully, but these errors were encountered: