-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: Mark builders to be const #172
Conversation
It seems like debug_asserts are causing problems with the MSRV:
When do you plan to bump the MSRV or do you have an idea how to fix that in the meantime? :) |
- Refactored all methods inside FibonacciBuilder, ExponentialBuilder, and ConstantBuilder to be const. - Added a new const `new` constructor for each builder which uses the values from default() - Updated the default method to call `new()`. - Added unit tests for the const builders to ensure they have the correct values.
Hi @Matt3o12, thank you for your work first! I believe we can remove that |
Hi @Matt3o12, are you interested in moving this PR forward? |
Hey, sorry about the late reply, I have forgotten about it. I have now removed the Edit: it seems you have to manually rerun the windows job or maybe empty the cache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Matt3o12 for working on this!
It's not related to this PR. embassy-time seems not work correctly on windows. |
Hello thank you for your work.
I have made changes so that all builders are now const. They should still be 100% backwards compadible. I had to introduce a constructor, new, as Default cannot be const just yet.
This allows me to define a const builder at the top and use it like this:
All changes:
new
constructor for each builder which uses the values from default()new()
.