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

Take advantage of Rust 1.82 featues. #541

Merged
merged 5 commits into from
Oct 17, 2024
Merged

Take advantage of Rust 1.82 featues. #541

merged 5 commits into from
Oct 17, 2024

Conversation

kpreid
Copy link
Owner

@kpreid kpreid commented Oct 17, 2024

  • Make {Rgb,Rgba}::new() const.
  • Use Option::is_none_or()
  • Use iter::repeat_n().
  • Remove some obsolete lint avoidance.

* Remove `allow(unknown_lints)`.
* Remove match arms that are unnecessary due to `min_exhaustive_patterns`
  being stabilized.
This could in principle replace the `rgb_const!` and `rgba_const!`
macros entirely; in some abstract sense we’d lose the syntactic
guarantee of no panicking, but in practice `Rgba::new(literals...)`
is obviously fine.
@kpreid kpreid merged commit ca07163 into main Oct 17, 2024
17 checks passed
@kpreid kpreid deleted the rust82 branch October 17, 2024 20:54
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