Skip to content

Replace lazy_static with once_cell#2962

Merged
ranile merged 2 commits intowasm-bindgen:mainfrom
jplatte:once-cell
Jun 23, 2022
Merged

Replace lazy_static with once_cell#2962
ranile merged 2 commits intowasm-bindgen:mainfrom
jplatte:once-cell

Conversation

@jplatte
Copy link
Copy Markdown
Contributor

@jplatte jplatte commented Jun 23, 2022

… and another drive-by improvement.

Nicer to read because it isn't a macro, and most of the Rust ecosystem has switched over already.

Copy link
Copy Markdown
Contributor

@ranile ranile left a comment

Choose a reason for hiding this comment

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

Looks good 👍. Thanks for the PR

@ranile ranile merged commit 41e239f into wasm-bindgen:main Jun 23, 2022
@jplatte jplatte deleted the once-cell branch June 23, 2022 22:47
lopopolo added a commit to artichoke/rust-onig that referenced this pull request Aug 6, 2022
`onig` is the only dependency left in Artichoke's `Cargo.lock` that uses
`lazy_static`. It looks like most of the ecosystem has moved to
`once_cell`. `once_cell` looks to be more actively maintained and is IMO
nicer to read since there are no macros.

See also this related change in `wasm-bindgen`:

- wasm-bindgen/wasm-bindgen#2962

`once_cell`'s MSRV is documented to be 1.36.0:

https://github.com/matklad/once_cell/blob/eda22cec55e9d37b16d408b7d0a5b396c7feb44c/CHANGELOG.md#151
iwillspeak pushed a commit to rust-onig/rust-onig that referenced this pull request Aug 7, 2022
`onig` is the only dependency left in Artichoke's `Cargo.lock` that uses
`lazy_static`. It looks like most of the ecosystem has moved to
`once_cell`. `once_cell` looks to be more actively maintained and is IMO
nicer to read since there are no macros.

See also this related change in `wasm-bindgen`:

- wasm-bindgen/wasm-bindgen#2962

`once_cell`'s MSRV is documented to be 1.36.0:

https://github.com/matklad/once_cell/blob/eda22cec55e9d37b16d408b7d0a5b396c7feb44c/CHANGELOG.md#151
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