From ae513052b4357cc8140f6d1fa73748f03b84b271 Mon Sep 17 00:00:00 2001 From: Richard Zak Date: Wed, 15 Jun 2022 11:25:55 -0400 Subject: [PATCH] chore: fix spelling Signed-off-by: Richard Zak --- .circleci/config.yml | 2 +- tokio-stream/src/stream_ext.rs | 4 ++-- tokio-util/src/codec/decoder.rs | 2 +- tokio-util/src/io/stream_reader.rs | 2 +- tokio/CHANGELOG.md | 6 +++--- tokio/src/park/mod.rs | 2 +- tokio/src/runtime/metrics/runtime.rs | 16 ++++++++-------- tokio/src/sync/barrier.rs | 2 +- tokio/src/sync/mpsc/chan.rs | 2 +- tokio/src/time/timeout.rs | 4 ++-- tokio/tests/rt_metrics.rs | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7e5b83fbdb9..d8d8ca672ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: image: ubuntu-2004:202101-01 resource_class: arm.medium environment: - # Change to pin rust versino + # Change to pin rust version RUST_STABLE: stable steps: - checkout diff --git a/tokio-stream/src/stream_ext.rs b/tokio-stream/src/stream_ext.rs index 5927dbd22ab..223b9e102dd 100644 --- a/tokio-stream/src/stream_ext.rs +++ b/tokio-stream/src/stream_ext.rs @@ -1070,10 +1070,10 @@ impl StreamExt for St where St: Stream {} /// Merge the size hints from two streams. fn merge_size_hints( (left_low, left_high): (usize, Option), - (right_low, right_hign): (usize, Option), + (right_low, right_high): (usize, Option), ) -> (usize, Option) { let low = left_low.saturating_add(right_low); - let high = match (left_high, right_hign) { + let high = match (left_high, right_high) { (Some(h1), Some(h2)) => h1.checked_add(h2), _ => None, }; diff --git a/tokio-util/src/codec/decoder.rs b/tokio-util/src/codec/decoder.rs index c5927783d15..84ecb2297ab 100644 --- a/tokio-util/src/codec/decoder.rs +++ b/tokio-util/src/codec/decoder.rs @@ -20,7 +20,7 @@ use std::io; /// it's possible to temporarily read 0 bytes by reaching EOF. /// /// In these cases `decode_eof` will be called until it signals -/// fullfillment of all closing frames by returning `Ok(None)`. +/// fulfillment of all closing frames by returning `Ok(None)`. /// After that, repeated attempts to read from the [`Framed`] or [`FramedRead`] /// will not invoke `decode` or `decode_eof` again, until data can be read /// during a retry. diff --git a/tokio-util/src/io/stream_reader.rs b/tokio-util/src/io/stream_reader.rs index 05ae8865573..6260f9e442c 100644 --- a/tokio-util/src/io/stream_reader.rs +++ b/tokio-util/src/io/stream_reader.rs @@ -93,7 +93,7 @@ where } /// Consumes this `StreamReader`, returning a Tuple consisting - /// of the underlying stream and an Option of the interal buffer, + /// of the underlying stream and an Option of the internal buffer, /// which is Some in case the buffer contains elements. pub fn into_inner_with_chunk(self) -> (S, Option) { if self.has_chunk() { diff --git a/tokio/CHANGELOG.md b/tokio/CHANGELOG.md index f158a94d946..2d67dad105b 100644 --- a/tokio/CHANGELOG.md +++ b/tokio/CHANGELOG.md @@ -1235,7 +1235,7 @@ Biggest changes are: - Feature flags are simplified - `rt-core` and `rt-util` are combined to `rt` - `rt-threaded` is renamed to `rt-multi-thread` to match builder API - - `tcp`, `udp`, `uds`, `dns` are combied to `net`. + - `tcp`, `udp`, `uds`, `dns` are combined to `net`. - `parking_lot` is included with `full` ### Changes @@ -1733,7 +1733,7 @@ Biggest changes are: - `net::lookup_host` maps a `T: ToSocketAddrs` to a stream of `SocketAddrs` ([#1870]). - `process::Child` fields are made public to match `std` ([#2014]). - impl `Stream` for `sync::broadcast::Receiver` ([#2012]). -- `sync::RwLock` provides an asynchonous read-write lock ([#1699]). +- `sync::RwLock` provides an asynchronous read-write lock ([#1699]). - `runtime::Handle::current` returns the handle for the current runtime ([#2040]). - `StreamExt::filter` filters stream values according to a predicate ([#2001]). - `StreamExt::filter_map` simultaneously filter and map stream values ([#2001]). @@ -1842,7 +1842,7 @@ Biggest changes are: ### Fixes - calling `spawn_blocking` after runtime shutdown ([#1875]). -- `LocalSet` drop inifinite loop ([#1892]). +- `LocalSet` drop infinite loop ([#1892]). - `LocalSet` hang under load ([#1905]). - improved documentation ([#1865], [#1866], [#1868], [#1874], [#1876], [#1911]). diff --git a/tokio/src/park/mod.rs b/tokio/src/park/mod.rs index 87d04ff78ea..9284702a681 100644 --- a/tokio/src/park/mod.rs +++ b/tokio/src/park/mod.rs @@ -85,7 +85,7 @@ pub(crate) trait Park { /// `Park` implementation. fn park_timeout(&mut self, duration: Duration) -> Result<(), Self::Error>; - /// Releases all resources holded by the parker for proper leak-free shutdown. + /// Releases all resources held by the parker for proper leak-free shutdown. fn shutdown(&mut self); } diff --git a/tokio/src/runtime/metrics/runtime.rs b/tokio/src/runtime/metrics/runtime.rs index 59a87525517..cb0edf52ad8 100644 --- a/tokio/src/runtime/metrics/runtime.rs +++ b/tokio/src/runtime/metrics/runtime.rs @@ -88,7 +88,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics @@ -176,7 +176,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics @@ -217,7 +217,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics @@ -261,7 +261,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics @@ -308,7 +308,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics @@ -354,7 +354,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics @@ -422,7 +422,7 @@ impl RuntimeMetrics { /// /// `worker` is the index of the worker being queried. The given value must /// be between 0 and `num_workers()`. The index uniquely identifies a single - /// worker and will continue to indentify the worker throughout the lifetime + /// worker and will continue to identify the worker throughout the lifetime /// of the runtime instance. /// /// # Panics @@ -512,7 +512,7 @@ cfg_net! { /// let metrics = Handle::current().metrics(); /// /// let n = metrics.io_driver_ready_count(); - /// println!("{} ready events procssed by the runtime's I/O driver.", n); + /// println!("{} ready events processed by the runtime's I/O driver.", n); /// } /// ``` pub fn io_driver_ready_count(&self) -> u64 { diff --git a/tokio/src/sync/barrier.rs b/tokio/src/sync/barrier.rs index b2f24bbadda..2ce1d731402 100644 --- a/tokio/src/sync/barrier.rs +++ b/tokio/src/sync/barrier.rs @@ -135,7 +135,7 @@ impl Barrier { // NOTE: we are taking a _synchronous_ lock here. // It is okay to do so because the critical section is fast and never yields, so it cannot // deadlock even if another future is concurrently holding the lock. - // It is _desireable_ to do so as synchronous Mutexes are, at least in theory, faster than + // It is _desirable_ to do so as synchronous Mutexes are, at least in theory, faster than // the asynchronous counter-parts, so we should use them where possible [citation needed]. // NOTE: the extra scope here is so that the compiler doesn't think `state` is held across // a yield point, and thus marks the returned future as !Send. diff --git a/tokio/src/sync/mpsc/chan.rs b/tokio/src/sync/mpsc/chan.rs index c3007de89c7..1228cfb6c6f 100644 --- a/tokio/src/sync/mpsc/chan.rs +++ b/tokio/src/sync/mpsc/chan.rs @@ -345,7 +345,7 @@ impl Drop for Chan { fn drop(&mut self) { use super::block::Read::Value; - // Safety: the only owner of the rx fields is Chan, and eing + // Safety: the only owner of the rx fields is Chan, and being // inside its own Drop means we're the last ones to touch it. self.rx_fields.with_mut(|rx_fields_ptr| { let rx_fields = unsafe { &mut *rx_fields_ptr }; diff --git a/tokio/src/time/timeout.rs b/tokio/src/time/timeout.rs index 4a93089e8e8..3a76a374cfd 100644 --- a/tokio/src/time/timeout.rs +++ b/tokio/src/time/timeout.rs @@ -21,7 +21,7 @@ use std::task::{self, Poll}; /// value is returned. Otherwise, an error is returned and the future is /// canceled. /// -/// # Cancelation +/// # Cancellation /// /// Cancelling a timeout is done by dropping the future. No additional cleanup /// or other work is required. @@ -87,7 +87,7 @@ where /// If the future completes before the instant is reached, then the completed /// value is returned. Otherwise, an error is returned. /// -/// # Cancelation +/// # Cancellation /// /// Cancelling a timeout is done by dropping the future. No additional cleanup /// or other work is required. diff --git a/tokio/tests/rt_metrics.rs b/tokio/tests/rt_metrics.rs index 1521cd26074..e86beb91421 100644 --- a/tokio/tests/rt_metrics.rs +++ b/tokio/tests/rt_metrics.rs @@ -113,7 +113,7 @@ fn worker_steal_count() { // scheduled" slot. tokio::spawn(async {}); - // Blocking receive on the channe. + // Blocking receive on the channel. rx.recv().unwrap(); }) .await