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 lazy_static with once_cell #657

Open
nindalf opened this issue Jan 25, 2022 · 1 comment
Open

Replace lazy_static with once_cell #657

nindalf opened this issue Jan 25, 2022 · 1 comment

Comments

@nindalf
Copy link

nindalf commented Jan 25, 2022

lazy_static is used throughout the cookbook to store data that should be initialised only once. once_cell is more flexible and convenient than lazy_static. For example, it can be used for local variables.

Integrating once_cell into the standard library is in progress - issue.

I propose that the cookbook change to using once_cell instead. Once it has been integrated into the standard library, the imports alone can be changed. Until then the cookbook could reflect best practice, which is to use once_cell.

@AndyGauge
Copy link
Collaborator

nice idea. I'm working on a rewrite, and welcome to revamping the cookbook based on changes in rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants