-
Notifications
You must be signed in to change notification settings - Fork 233
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
Mark some functions in Instruction
and public api as const.
#237
Comments
Instruction
and pubic api as const.Instruction
and public api as const.
Yes, many/most/all of those methods could be const. Want to send a PR and enable those you need (and maybe more?) |
Didn't mean to close it. |
Sure I could send a PR, probably won't be till Friday though. |
Doing some work on this, some things that should unlock more parts of the library that can be made const for the future.
And the stuff out of our control and for the language to languish in.
|
Other
Also the |
Many of them definitely can be made const, unless it results in slow compile time or bigger binary file size or something like that. |
1.56.0 version is too recent, current version is 1.57.0. That will probably prevent too many from using the crate. |
Yep I can probably do some new constructors and just delegate Default to those. My first pull request was really for everything that is blindingly obvious that could be made const. For &mut const, that is still nightly: rust-lang/rust#57349 |
I changed all the lookup tables locally to |
I've learned of the |
Essentially introduce const where appropriate for the public types exposed by the api.
This request intentionally only targets some functions since we don't have stable
&mut
in const contexts along with a bunch of other const stuff that is still nightly.I don't expect that iced will ever become 100% const, that's unreasonable to assume due to the fact iced needs liballoc around the crate. The reason for introducing const where appropriate would be some nice utility for libraries using iced downstream that don't need to use the decoder and instead just operate on already existing types such as
Instruction
so their functions could also be const.The text was updated successfully, but these errors were encountered: