Skip to content

Commit 1c2abda

Browse files
committed
Add Once::new as a way of constructing a Once
1 parent 7426f5c commit 1c2abda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/sync/once.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ use thread::{self, Thread};
7373
/// A synchronization primitive which can be used to run a one-time global
7474
/// initialization. Useful for one-time initialization for FFI or related
7575
/// functionality. This type can only be constructed with the [`ONCE_INIT`]
76-
/// value.
76+
/// value or the equivalent [`Once::new`] constructor.
7777
///
7878
/// [`ONCE_INIT`]: constant.ONCE_INIT.html
79+
/// [`Once::new`]: struct.Once.html#method.new
7980
///
8081
/// # Examples
8182
///

0 commit comments

Comments
 (0)