Skip to content

futures-util: make Mutex::new() const #2956

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jstarks
Copy link

@jstarks jstarks commented May 31, 2025

This builds with the MSRV (1.68) and is convenient for creating static mutexes.

This does bind the implementation to never allocate in new in the future, but that seems like a desirable property anyway.

Note that this also requires updating slab to 0.4.7, which is the first version that supports const Slab::new().

This builds with the MSRV (1.68) and is convenient for creating `static`
mutexes.

This does bind the implementation to never allocate in `new` in the
future, but that seems like a desirable property anyway.

Note that this also requires updating slab to 0.4.7, which is the first
version that supports const `Slab::new()`.
@rustbot rustbot added A-lock Area: futures::lock S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lock Area: futures::lock S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants