matklad / once_cell

Rust library for single assignment cells and lazy statics without macros

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Covariant, compact sync::Lazy

matklad opened this issue · comments

#233 rewote unsync::Lazy to be convariant API-wise and have a smaller size_of. This required re-implementing OnceCell functionality, rather than delegating to it.

We should apply a similar treatment to sync module.

Special care should be taken to ensure we have all relevant tests. Before, we delegated most of unsafety to OnceCell, now we need to essentially repeat OnceCell test suite.