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

More const with MSRV 1.83 #91

Open
tomcur opened this issue Dec 12, 2024 · 4 comments
Open

More const with MSRV 1.83 #91

tomcur opened this issue Dec 12, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@tomcur
Copy link
Member

tomcur commented Dec 12, 2024

Once Color gets an MSRV of 1.83, some more methods can be marked const:

  • Missing::insert
  • Flags::set_missing
  • Flags::set_named_color_space
  • Flags::discard_name
@tomcur tomcur added the enhancement New feature or request label Dec 12, 2024
@DJMcNab
Copy link
Member

DJMcNab commented Dec 12, 2024

I wouldn't necessarily be opposed to doing that MSRV bump now. OTOH, these are relatively minor wins that it's probably not worth it?

@tomcur
Copy link
Member Author

tomcur commented Dec 12, 2024

I don't think they're so important that it needs to land now, but I did want to track it so we remember to do this later. It can make some of the flag/missing manipulations in const contexts a bit more ergonomic.

That said, I'd also be fine with doing the bump now.

@DJMcNab
Copy link
Member

DJMcNab commented Dec 12, 2024

My suggestion would be to add warn(clippy::missing_const_for_fn) on the specific items, so that when the MSRV bump does happen, we get a direct warning (I'd consider even enabling that lint globally, so that we are forced to make an explicit decision...)

@waywardmonkeys
Copy link
Collaborator

I am already delaying trying to introduce color to some things due to MSRV, so I am happy to track these things, but less excited about them actually landing yet.

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

No branches or pull requests

3 participants