diff options
author | Nylonicious <50183564+nylonicious@users.noreply.github.com> | 2020-09-17 08:03:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 08:03:38 +0200 |
commit | 3fd043931e6d37f211e682980edc6e12e9d4fc54 (patch) | |
tree | a17cbc12b4e8387227ce56c66323ae8a840421a6 | |
parent | 4c4699be00bf4aee6218f84ec606e043286a8c2a (diff) |
sync: fix some doc typos (#2838)
Fixes #2781.
-rw-r--r-- | tokio/src/sync/broadcast.rs | 2 | ||||
-rw-r--r-- | tokio/src/sync/mod.rs | 2 | ||||
-rw-r--r-- | tokio/src/sync/semaphore.rs | 2 | ||||
-rw-r--r-- | tokio/src/sync/semaphore_ll.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tokio/src/sync/broadcast.rs b/tokio/src/sync/broadcast.rs index 9b3de530..9484e130 100644 --- a/tokio/src/sync/broadcast.rs +++ b/tokio/src/sync/broadcast.rs @@ -793,7 +793,7 @@ where /// This is useful for a flavor of "optimistic check" before deciding to /// await on a receiver. /// - /// Compared with [`recv`], this function has three failure cases instead of one + /// Compared with [`recv`], this function has three failure cases instead of two /// (one for closed, one for an empty buffer, one for a lagging receiver). /// /// `Err(TryRecvError::Closed)` is returned when all `Sender` halves have diff --git a/tokio/src/sync/mod.rs b/tokio/src/sync/mod.rs index 6dce9a7b..1a584383 100644 --- a/tokio/src/sync/mod.rs +++ b/tokio/src/sync/mod.rs @@ -20,7 +20,7 @@ //! few flavors of channels provided by Tokio. Each channel flavor supports //! different message passing patterns. When a channel supports multiple //! producers, many separate tasks may **send** messages. When a channel -//! supports muliple consumers, many different separate tasks may **receive** +//! supports multiple consumers, many different separate tasks may **receive** //! messages. //! //! Tokio provides many different channel flavors as different message passing diff --git a/tokio/src/sync/semaphore.rs b/tokio/src/sync/semaphore.rs index 136f14e6..4f8b0026 100644 --- a/tokio/src/sync/semaphore.rs +++ b/tokio/src/sync/semaphore.rs @@ -1,7 +1,7 @@ use super::batch_semaphore as ll; // low level implementation use std::sync::Arc; -/// Counting semaphore performing asynchronous permit aquisition. +/// Counting semaphore performing asynchronous permit acquisition. /// /// A semaphore maintains a set of permits. Permits are used to synchronize /// access to a shared resource. A semaphore differs from a mutex in that it diff --git a/tokio/src/sync/semaphore_ll.rs b/tokio/src/sync/semaphore_ll.rs index 25d25ac8..f044095f 100644 --- a/tokio/src/sync/semaphore_ll.rs +++ b/tokio/src/sync/semaphore_ll.rs @@ -910,7 +910,7 @@ impl Waiter { } /// Try to decrement the number of permits to acquire. This returns the - /// actual number of permits that were decremented. The delta betweeen `n` + /// actual number of permits that were decremented. The delta between `n` /// and the return has been assigned to the permit and the caller must /// assign these back to the semaphore. fn try_dec_permits_to_acquire(&self, n: usize) -> usize { |