Skip to content

Commit 28d29ae

Browse files
committed
Fix: sync::OnceCell::try_insert docs should import sync variant
The doc example (i.e. doctest) imported the `unsync` variant of `OnceCell`.
1 parent fda60a6 commit 28d29ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ pub mod sync {
10671067
/// # Example
10681068
///
10691069
/// ```
1070-
/// use once_cell::unsync::OnceCell;
1070+
/// use once_cell::sync::OnceCell;
10711071
///
10721072
/// let cell = OnceCell::new();
10731073
/// assert!(cell.get().is_none());

0 commit comments

Comments
 (0)