mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
chore: fix spelling (#4769)
Signed-off-by: Richard Zak <richard@profian.com>
This commit is contained in:
parent
d487c1ca34
commit
f26ce08f37
@ -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
|
||||
|
@ -1070,10 +1070,10 @@ impl<St: ?Sized> StreamExt for St where St: Stream {}
|
||||
/// Merge the size hints from two streams.
|
||||
fn merge_size_hints(
|
||||
(left_low, left_high): (usize, Option<usize>),
|
||||
(right_low, right_hign): (usize, Option<usize>),
|
||||
(right_low, right_high): (usize, Option<usize>),
|
||||
) -> (usize, Option<usize>) {
|
||||
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,
|
||||
};
|
||||
|
@ -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.
|
||||
|
@ -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<B>) {
|
||||
if self.has_chunk() {
|
||||
|
@ -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]).
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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.
|
||||
|
@ -345,7 +345,7 @@ impl<T, S> Drop for Chan<T, S> {
|
||||
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 };
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user