Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

[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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants