Skip to content

Commit

Permalink
sync: fix typos in OnceCell docs (#7047)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecsl authored Dec 21, 2024
1 parent b54b9d4 commit 4ca13e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tokio/src/sync/once_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::ptr;
use std::sync::atomic::{AtomicBool, Ordering};

// This file contains an implementation of an OnceCell. The principle
// behind the safety the of the cell is that any thread with an `&OnceCell` may
// behind the safety of the cell is that any thread with an `&OnceCell` may
// access the `value` field according the following rules:
//
// 1. When `value_set` is false, the `value` field may be modified by the
Expand Down Expand Up @@ -179,8 +179,8 @@ impl<T> OnceCell<T> {
///
/// [`OnceCell::new`]: crate::sync::OnceCell::new
// Once https://github.com/rust-lang/rust/issues/73255 lands
// and tokio MSRV is bumped to the rustc version with it stablised,
// we can made this function available in const context,
// and tokio MSRV is bumped to the rustc version with it stabilised,
// we can make this function available in const context,
// by creating `Semaphore::const_new_closed`.
pub fn new_with(value: Option<T>) -> Self {
if let Some(v) = value {
Expand Down

0 comments on commit 4ca13e6

Please sign in to comment.