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

Replace once_cell::OnceCell with std::sync::OnceLock. #1246

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

partim
Copy link
Member

@partim partim commented Jan 8, 2025

This PR removes the dependency on once_cell since all the relevant functionality is now in std.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@partim partim requested a review from a team January 8, 2025 11:00
Copy link
Contributor

@Koenvh1 Koenvh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was first wondering why you used OnceLock rather than OnceCell, but I'm assuming it's because of the thread safety.

@partim
Copy link
Member Author

partim commented Jan 10, 2025

Correct. The crate has unsync::OnceCell and sync::OnceCell, but std decided to rename the latter into OnceLock.

@partim partim merged commit 9ef5e22 into main Jan 10, 2025
18 checks passed
@partim partim deleted the remove-once-cell-dependency branch January 10, 2025 11:17
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.

None yet

2 participants