Don't recommend ONCE_INIT in std::sync::Once

ONCE_INIT is deprecated, and so suggesting it as not only being on par with, but before `Once::new` is a bad idea.
This commit is contained in:
boyned//Kampfkarren 2019-10-16 00:06:01 -07:00 committed by GitHub
parent f54911c6f2
commit 247df6e134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,10 +60,9 @@
/// A synchronization primitive which can be used to run a one-time global
/// initialization. Useful for one-time initialization for FFI or related
/// functionality. This type can only be constructed with the [`ONCE_INIT`]
/// value or the equivalent [`Once::new`] constructor.
/// functionality. This type can only be constructed with the [`Once::new`]
/// constructor.
///
/// [`ONCE_INIT`]: constant.ONCE_INIT.html
/// [`Once::new`]: struct.Once.html#method.new
///
/// # Examples