-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improvement: replace lazy_static with once_cell #19
Comments
as it is not a critical issue, I'm closing this issue! Please, feel free to submit a PR with the proper changes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I would suggest to change
lazy_static
foronce_cell
, lazy static was needed because back in 2015 in rust 1.0 it was impossible to express something like a compile time shared global ressource but safely accessed.Since 2019, it's possible with : https://github.com/matklad/once_cell also the author openned a RFC PR 0000-standard-lazy-types.md to make it in std Tracking Issue for once_cell
It's used here : https://github.com/Gandi/jbod-rs/blob/main/src/prometheus.rs#L54-L71 and maybe used for regex compiled on the fly.
Gains:
The text was updated successfully, but these errors were encountered: