futures-util: make Mutex::new() const by jstarks · Pull Request #2956 · rust-lang/futures-rs (original) (raw)
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().
added A-lock
Area: futures::lock
Status: Awaiting review from the assignee but also interested parties.
labels
taiki-e added 0.3-backport: pending
The maintainer accepted to backport this to the 0.3 branch, but backport has not been done yet.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
taiki-e pushed a commit that referenced this pull request
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().
taiki-e pushed a commit that referenced this pull request
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})