bikeshedder / deadpool

Dead simple pool implementation for rust with async-await
Apache License 2.0
1.08k stars 137 forks source link

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

Closed Turbo87 closed 7 months ago

Turbo87 commented 7 months ago

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 commented 7 months ago

Makes sense! :+1:

bikeshedder commented 7 months ago

Could you please update the CHANGELOG.md accordingly?

bikeshedder commented 7 months ago

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

Thanks a lot! :tada:

Turbo87 commented 7 months ago

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