-
Notifications
You must be signed in to change notification settings - Fork 181
Migrate from lazy_static to once_cell #81
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
What problem does this solve or what need does it fill?
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.
What solution would you like?
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.
What alternative(s) have you considered?
Leave it as is.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request