From 9a3603fa75ff854e007d372061edf47cf8d02690 Mon Sep 17 00:00:00 2001 From: Alexandr <53787217+qwerty541@users.noreply.github.com> Date: Sat, 27 Mar 2021 05:27:52 +0200 Subject: [PATCH] chore: fix several typos in docs (#3651) --- tokio/src/lib.rs | 4 ++-- tokio/src/runtime/mod.rs | 2 +- tokio/src/runtime/queue.rs | 2 +- tokio/src/sync/mpsc/block.rs | 4 ++-- tokio/src/task/task_local.rs | 2 +- tokio/src/time/driver/handle.rs | 4 ++-- tokio/src/util/linked_list.rs | 2 +- tokio/src/util/wake.rs | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index f6c502e56..15aeced6d 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -76,7 +76,7 @@ //! //! ### Authoring libraries //! -//! As a library author your goal should be to provide the lighest weight crate +//! As a library author your goal should be to provide the lightest weight crate //! that is based on Tokio. To achieve this you should ensure that you only enable //! the features you need. This allows users to pick up your crate without having //! to enable unnecessary features. @@ -410,7 +410,7 @@ mod util; /// # Why was `Stream` not included in Tokio 1.0? /// /// Originally, we had planned to ship Tokio 1.0 with a stable `Stream` type -/// but unfortunetly the [RFC] had not been merged in time for `Stream` to +/// but unfortunately the [RFC] had not been merged in time for `Stream` to /// reach `std` on a stable compiler in time for the 1.0 release of Tokio. For /// this reason, the team has decided to move all `Stream` based utilities to /// the [`tokio-stream`] crate. While this is not ideal, once `Stream` has made diff --git a/tokio/src/runtime/mod.rs b/tokio/src/runtime/mod.rs index 3ad4c1890..52532ec6f 100644 --- a/tokio/src/runtime/mod.rs +++ b/tokio/src/runtime/mod.rs @@ -250,7 +250,7 @@ cfg_rt! { /// /// The Tokio runtime implements `Sync` and `Send` to allow you to wrap it /// in a `Arc`. Most fn take `&self` to allow you to call them concurrently - /// accross multiple threads. + /// across multiple threads. /// /// Calls to `shutdown` and `shutdown_timeout` require exclusive ownership of /// the runtime type and this can be achieved via `Arc::try_unwrap` when only diff --git a/tokio/src/runtime/queue.rs b/tokio/src/runtime/queue.rs index 1c7bb2309..6ea23c926 100644 --- a/tokio/src/runtime/queue.rs +++ b/tokio/src/runtime/queue.rs @@ -572,7 +572,7 @@ impl Inject { let mut p = self.pointers.lock(); - // It is possible to hit null here if another thread poped the last + // It is possible to hit null here if another thread popped the last // task between us checking `len` and acquiring the lock. let task = p.head?; diff --git a/tokio/src/sync/mpsc/block.rs b/tokio/src/sync/mpsc/block.rs index 6bef7946e..1c9ab14e9 100644 --- a/tokio/src/sync/mpsc/block.rs +++ b/tokio/src/sync/mpsc/block.rs @@ -186,7 +186,7 @@ impl Block { /// /// * The block will no longer be accessed by any sender. pub(crate) unsafe fn tx_release(&self, tail_position: usize) { - // Track the observed tail_position. Any sender targetting a greater + // Track the observed tail_position. Any sender targeting a greater // tail_position is guaranteed to not access this block. self.observed_tail_position .with_mut(|ptr| *ptr = tail_position); @@ -350,7 +350,7 @@ impl Block { } } -/// Returns `true` if the specificed slot has a value ready to be consumed. +/// Returns `true` if the specified slot has a value ready to be consumed. fn is_ready(bits: usize, slot: usize) -> bool { let mask = 1 << slot; mask == mask & bits diff --git a/tokio/src/task/task_local.rs b/tokio/src/task/task_local.rs index e240cb6e5..6571ffd7b 100644 --- a/tokio/src/task/task_local.rs +++ b/tokio/src/task/task_local.rs @@ -174,7 +174,7 @@ impl LocalKey { /// Accesses the current task-local and runs the provided closure. /// - /// If the task-local with the accociated key is not present, this + /// If the task-local with the associated key is not present, this /// method will return an `AccessError`. For a panicking variant, /// see `with`. pub fn try_with(&'static self, f: F) -> Result diff --git a/tokio/src/time/driver/handle.rs b/tokio/src/time/driver/handle.rs index 00f648e6f..9a05a54fc 100644 --- a/tokio/src/time/driver/handle.rs +++ b/tokio/src/time/driver/handle.rs @@ -48,7 +48,7 @@ cfg_rt! { /// since the function is executed outside of the runtime. /// Whereas `rt.block_on(async {delay_for(...).await})` doesn't panic. /// And this is because wrapping the function on an async makes it lazy, - /// and so gets executed inside the runtime successfuly without + /// and so gets executed inside the runtime successfully without /// panicking. pub(crate) fn current() -> Self { crate::runtime::context::time_handle() @@ -73,7 +73,7 @@ cfg_not_rt! { /// since the function is executed outside of the runtime. /// Whereas `rt.block_on(async {delay_for(...).await})` doesn't /// panic. And this is because wrapping the function on an async makes it - /// lazy, and so outside executed inside the runtime successfuly without + /// lazy, and so outside executed inside the runtime successfully without /// panicking. pub(crate) fn current() -> Self { panic!(crate::util::error::CONTEXT_MISSING_ERROR) diff --git a/tokio/src/util/linked_list.rs b/tokio/src/util/linked_list.rs index 46812766e..e74cd61b2 100644 --- a/tokio/src/util/linked_list.rs +++ b/tokio/src/util/linked_list.rs @@ -126,7 +126,7 @@ impl LinkedList { } } - /// Returns whether the linked list doesn not contain any node + /// Returns whether the linked list does not contain any node pub(crate) fn is_empty(&self) -> bool { if self.head.is_some() { return false; diff --git a/tokio/src/util/wake.rs b/tokio/src/util/wake.rs index e49f1e895..001577d74 100644 --- a/tokio/src/util/wake.rs +++ b/tokio/src/util/wake.rs @@ -4,7 +4,7 @@ use std::ops::Deref; use std::sync::Arc; use std::task::{RawWaker, RawWakerVTable, Waker}; -/// Simplfied waking interface based on Arcs +/// Simplified waking interface based on Arcs pub(crate) trait Wake: Send + Sync { /// Wake by value fn wake(self: Arc);