Update documentation for Once to reference std::sync::OnceLock. #159
briansmith/b/unlike-std into master
@ -39,8 +39,6 @@
//!
What's the reason for removing this?
@ -8,9 +8,7 @@ use core::{cell::UnsafeCell, fmt, marker::PhantomData, mem::MaybeUninit};
Hmm, I think this is probably too strong a statement. They're definitely very similar, but the APIs differ enough that I'd probably go for something like:
This type has similar behaviour to `std::sync::OnceLock`.
@ -39,8 +39,6 @@
//!
Previously, we were comparing spin::Once to std::sync::Once, which didn't own the result of the initializer. Now we're comparing it to OnceLock, which does own the result of the initializer.
@ -8,9 +8,7 @@ use core::{cell::UnsafeCell, fmt, marker::PhantomData, mem::MaybeUninit};
The previous "equivalent" was already much stronger language than "analogous," which isn't any stronger of a statement than "similar behavio[u]r." For most people, if they need a spinlock variant of std::sync::OnceLock then they'll consider spin::Once.
Apologies for not finishing off this review earlier, I've had a lot on this week. I should be in a position to finish this off tomorrow.
The same updates could probably be applied to spin::Lazy now that std::sync::LazyLock is now stable.
- src/lib.rs
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?