Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
214: Explain safety of `unsync::OnceCell::get(&self)` in more detail r=matklad a=Enselic Background: I'm working on improving my unsafe Rust skills, and figuring out how `once_cell` works is one way to do that. By more elaborately explaining why `unsync::OnceCell::get(&self)` is safely implemented, I hope to help others increase their understanding of unsafe Rust as well. (It was not obvious to me at first why `unsync::OnceCell::get(&self)` was safe. But I think I figured it out now.) Co-authored-by: Martin Nordholts <[email protected]>
- Loading branch information