Skip to content

Commit

Permalink
Update documentation for Once to reference std::sync::OnceLock.
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Dec 1, 2023
1 parent 7440fab commit ff94aac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ use core::{cell::UnsafeCell, fmt, marker::PhantomData, mem::MaybeUninit};

/// A primitive that provides lazy one-time initialization.
///
/// Unlike its `std::sync` equivalent, this is generalized such that the closure returns a
/// value to be stored by the [`Once`] (`std::sync::Once` can be trivially emulated with
/// `Once`).
/// This is analogous to `std::sync::OnceLock`.
///
/// Because [`Once::new`] is `const`, this primitive may be used to safely initialize statics.
///
Expand Down

0 comments on commit ff94aac

Please sign in to comment.