chore: fix several typos in docs (#3651)

This commit is contained in:
Alexandr 2021-03-27 05:27:52 +02:00 committed by GitHub
parent 724ba348d1
commit 9a3603fa75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -572,7 +572,7 @@ impl<T: 'static> Inject<T> {
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?;

View File

@ -186,7 +186,7 @@ impl<T> Block<T> {
///
/// * 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<T> Block<T> {
}
}
/// 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

View File

@ -174,7 +174,7 @@ impl<T: 'static> LocalKey<T> {
/// 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<F, R>(&'static self, f: F) -> Result<R, AccessError>

View File

@ -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)

View File

@ -126,7 +126,7 @@ impl<L: Link> LinkedList<L, L::Target> {
}
}
/// 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;

View File

@ -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<Self>);