Skip to content

Migrate from lazy_static to once_cell  #71

@james7132

Description

@james7132

lazy_static involves macros, takes a bit longer to compile, and once_cell provides more flexible ways on the way to being added to std. Replace all usages of lazy_static with static VAR: Lazy<T>.

One potential drawback is that lazy_static supports spin-waiting on the result, while Lazy doesn't. I don't think any of the crate's usages are perf-bound by this though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions