Skip to content

Remove lazily initialized Mutex - #723

Merged
workingjubilee merged 1 commit into
rust-lang:masterfrom
Mark-Simulacrum:remove-lazy-init
Sep 23, 2025
Merged

workingjubilee merged 1 commit into
rust-lang:masterfrom
Mark-Simulacrum:remove-lazy-init

Conversation

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Mutex::new is const since 1.63, which is below the 1.82 MSRV, so this should be fine to rely on. I wouldn't expect this to practically matter ~ever, but spotted this while poking around and it seems like a nice bit of cleanup (also removes a bit of unsafe and a leaked allocation).

Mutex::new is const since 1.63, which is below the 1.82 MSRV, so this
should be fine to rely on.
@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

(CI failure looks like a bug in GitHub probably?)

@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

Alright, that fixed CI. Should be ready for review.

@workingjubilee

Copy link
Copy Markdown
Member

Thanks!

@workingjubilee
workingjubilee merged commit b134a1f into rust-lang:master Sep 23, 2025
39 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 2, 2025
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