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

Timeouts: Make new() and wait_millis() const fns #315

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

Turbo87
Copy link
Contributor

@Turbo87 Turbo87 commented Apr 10, 2024

This allows users to declare e.g. const TIMEOUTS: Timeouts = Timeouts::wait_millis(500); without the compiler screaming at them. This is made possible by the fact that Duration::from_millis() is also a const fn since Rust 1.32.

This makes it possible to declare `new()` as a `const fn` in the next commit.
This allows users to declare e.g. `const TIMEOUTS: Timeouts = Timeouts::wait_millis(500);` without the compiler screaming at them. This is made possible by the fact that `Duration::from_millis()` is also a `const fn` since Rust 1.32.
@bikeshedder
Copy link
Owner

Makes sense! 👍

@bikeshedder
Copy link
Owner

Could you please update the CHANGELOG.md accordingly?

@bikeshedder bikeshedder merged commit 812f6cb into bikeshedder:master Apr 10, 2024
63 checks passed
@bikeshedder
Copy link
Owner

I just updated the CHANGELOG and published deadpool 0.11.2 containing these changes.

Thanks a lot! 🎉

@Turbo87
Copy link
Contributor Author

Turbo87 commented Apr 11, 2024

sweet, thanks! (sorry, I just saw the comment above 🙈)

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.

2 participants