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

[refactor] deprecate lazy_static #915

Closed
wants to merge 1 commit into from

Conversation

lightsing
Copy link
Member

@lightsing lightsing commented Sep 7, 2023

Description

The crate lazy_static is deprecated in May 4 by rust-lang-nursery/lazy-static.rs#214
This PR migrate all lazy_static usage to once_cell.

Future works

It's worth noting that many of our APIs, such as Word::zero and address!(), could benefit from being available as const.
As we can get rid of Lazy::new(|| ...) and replace them with const SOMETHING: Word = Word::zero().
Moving forward, we should make these APIs available as const functions.

For reference, primitive-types = "0.12.1" has U256::zero as const fn

const parser marco: #918

@lispc
Copy link

lispc commented Jan 31, 2024

@lightsing i think this is outdated since when you upgraded rust, this was already fixed?

@lispc lispc closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants