Skip to content
New issue

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

deprecate the color_u8! macro and make methods const #818

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cyrgani
Copy link
Contributor

@cyrgani cyrgani commented Sep 23, 2024

With Rust 1.82, const_fn_floating_point_arithmetic is stable (see rust-lang/rust#57241).

This means that Color::from_rgba can be const and the color_u8! macro is not required anymore. Color::from_rgba_f32 was added too since the macro allowed passing f32 as well as u8 (or anything else, actually).

Note that this should only be merged after the release of 1.82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant