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

Remove once_cell dependency preferring LazyLock #195

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

Qkessler
Copy link
Contributor

Change Summary

once_cell's features were stabilized and included in the standard library under the std::sync module. We can use LazyLock to have the same behaviour as OnceCell::get_or_init.

With this change, we reduce the dependencies further, even though the removal happens on the dev-dependencies scope.

Risks associated with this change

The only risk that comes to mind is that without once_cell, we expect users developing argh (using the dev-dependencies) to use the 1.80.0+ Rust version.

Testing

cargo nextest run && cargo t --doc with all tests passing.

`once_cell`'s features were stabilized and included in the standard
library under the std::sync module. We can use `LazyLock` to have the
same behaviour as `OnceCell::get_or_init`.
Copy link

google-cla bot commented Dec 28, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Qkessler
Copy link
Contributor Author

I signed the CLA, I wonder whether I can retrigger the approval flow.

@sadmac7000 sadmac7000 merged commit 6e70ecc into google:master Dec 28, 2024
5 checks passed
@Qkessler Qkessler deleted the remove-once-cell branch December 28, 2024 19:49
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