1.0.0 (older version) Thoroughness: Medium Understanding: High
by gitlab.com/chrysn on 2022-11-20
This review is from Crev, a distributed system for code reviews. To add your review, set up cargo-crev
.
The current version of StaticCell is 2.1.0.
1.0.0 (older version) Thoroughness: Medium Understanding: High
by gitlab.com/chrysn on 2022-11-20
Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository with a git tag matching the version. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.
To review the actual code of the crate, it's best to use cargo crev open static_cell
. Alternatively, you can download the tarball of static_cell v2.1.0 or view the source online.
Simple encapsulation of the unsafeness of setting a static variable only once and using that value as &'static from there on. Less automatic than lazy_static. More focused on the no_std (and possibly atomic polyfilling) use case than once_cell, which otherwise provides a more comprehensive feature set.