diff --git a/spellcheck.dic b/spellcheck.dic index b978af4f1ee..08f8633402d 100644 --- a/spellcheck.dic +++ b/spellcheck.dic @@ -1,4 +1,4 @@ -286 +265 \ ~ ~4 @@ -32,9 +32,6 @@ Adaptors AIO ambiant amongst -api -APIs -assert_eq async awaitable backend @@ -43,17 +40,11 @@ backtrace backtraces backtracing binded -bitfield -bitfields Blockingly -bool -boolean broadcasted -buf cancelled cancelling Cancelling -cfg CLI cloneable codebase @@ -61,10 +52,6 @@ codec codecs combinator combinators -Config -config -connectionless -const cpu cpus Customizable @@ -110,10 +97,7 @@ filesystems fn fns FreeBSD -frontend -fs functionalities -fuzz_linked_list getters GID Growable @@ -167,7 +151,6 @@ Nagle nonblocking nondecreasing noop -notitifications ntasks ok oneshot @@ -204,10 +187,6 @@ runtime's rwlock rx scalability -scheduler's -semver -setpgid -shard_id sharded signalled signalling diff --git a/tokio-macros/src/entry.rs b/tokio-macros/src/entry.rs index ed782ad38f6..828f779107c 100644 --- a/tokio-macros/src/entry.rs +++ b/tokio-macros/src/entry.rs @@ -32,7 +32,7 @@ struct FinalConfig { crate_name: Option, } -/// Config used in case of the attribute not being able to build a valid config +/// `Config` used in case of the attribute not being able to build a valid `config` const DEFAULT_ERROR_CONFIG: FinalConfig = FinalConfig { flavor: RuntimeFlavor::CurrentThread, worker_threads: None, diff --git a/tokio-util/src/io/mod.rs b/tokio-util/src/io/mod.rs index 6c40d739014..4f1584184c3 100644 --- a/tokio-util/src/io/mod.rs +++ b/tokio-util/src/io/mod.rs @@ -4,7 +4,7 @@ //! allow converting between a hyper [`Body`] and [`AsyncRead`]. //! //! The [`SyncIoBridge`] type converts from the world of async I/O -//! to synchronous I/O; this may often come up when using synchronous APIs +//! to synchronous I/O; this may often come up when using synchronous `APIs` //! inside [`tokio::task::spawn_blocking`]. //! //! [`Body`]: https://docs.rs/hyper/0.13/hyper/struct.Body.html diff --git a/tokio-util/src/task/task_tracker.rs b/tokio-util/src/task/task_tracker.rs index d8f3bb4859a..8e3b6206283 100644 --- a/tokio-util/src/task/task_tracker.rs +++ b/tokio-util/src/task/task_tracker.rs @@ -23,7 +23,7 @@ use tokio::{ /// `CancellationToken` is used to signal to tasks that they should shut down, and the /// `TaskTracker` is used to wait for them to finish shutting down. /// -/// The `TaskTracker` will also keep track of a `closed` boolean. This is used to handle the case +/// The `TaskTracker` will also keep track of a `closed` `boolean`. This is used to handle the case /// where the `TaskTracker` is empty, but we don't want to shut down yet. This means that the /// [`wait`] method will wait until *both* of the following happen at the same time: /// diff --git a/tokio/src/fs/mocks.rs b/tokio/src/fs/mocks.rs index b718ed54f95..531e8a8c872 100644 --- a/tokio/src/fs/mocks.rs +++ b/tokio/src/fs/mocks.rs @@ -1,4 +1,4 @@ -//! Mock version of std::fs::File; +//! Mock version of `std::fs::File`; use mockall::mock; use crate::sync::oneshot; diff --git a/tokio/src/io/async_fd.rs b/tokio/src/io/async_fd.rs index aaf17584198..6c400242b22 100644 --- a/tokio/src/io/async_fd.rs +++ b/tokio/src/io/async_fd.rs @@ -55,7 +55,7 @@ use std::{task::Context, task::Poll}; /// /// ## Use with to a poll-based API /// -/// In some cases it may be desirable to use `AsyncFd` from APIs similar to +/// In some cases it may be desirable to use `AsyncFd` from `APIs` similar to /// [`TcpStream::poll_read_ready`]. The [`AsyncFd::poll_read_ready`] and /// [`AsyncFd::poll_write_ready`] functions are provided for this purpose. /// Because these functions don't create a future to hold their state, they have diff --git a/tokio/src/io/mod.rs b/tokio/src/io/mod.rs index 5e903c04842..553b57d398d 100644 --- a/tokio/src/io/mod.rs +++ b/tokio/src/io/mod.rs @@ -150,11 +150,11 @@ //! //! # Standard input and output //! -//! Tokio provides asynchronous APIs to standard [input], [output], and [error]. -//! These APIs are very similar to the ones provided by `std`, but they also +//! Tokio provides asynchronous `APIs` to standard [input], [output], and [error]. +//! These `APIs` are very similar to the ones provided by `std`, but they also //! implement [`AsyncRead`] and [`AsyncWrite`]. //! -//! Note that the standard input / output APIs **must** be used from the +//! Note that the standard input / output `APIs` **must** be used from the //! context of the Tokio runtime, as they require Tokio-specific features to //! function. Calling these functions outside of a Tokio runtime will panic. //! diff --git a/tokio/src/io/util/read_line.rs b/tokio/src/io/util/read_line.rs index e641f515324..eacc7d59602 100644 --- a/tokio/src/io/util/read_line.rs +++ b/tokio/src/io/util/read_line.rs @@ -51,7 +51,7 @@ fn put_back_original_data(output: &mut String, mut vector: Vec, num_bytes_re /// This handles the various failure cases and puts the string back into `output`. /// -/// The `truncate_on_io_error` bool is necessary because `read_to_string` and `read_line` +/// The `truncate_on_io_error` `bool` is necessary because `read_to_string` and `read_line` /// disagree on what should happen when an IO error occurs. pub(super) fn finish_string_read( io_res: io::Result, diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index c1daa2b26f4..f0ac5741512 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -28,7 +28,7 @@ //! * Tools for [working with asynchronous tasks][tasks], including //! [synchronization primitives and channels][sync] and [timeouts, sleeps, and //! intervals][time]. -//! * APIs for [performing asynchronous I/O][io], including [TCP and UDP][net] sockets, +//! * `APIs` for [performing asynchronous I/O][io], including [TCP and UDP][net] sockets, //! [filesystem][fs] operations, and [process] and [signal] management. //! * A [runtime] for executing asynchronous code, including a task scheduler, //! an I/O driver backed by the operating system's event queue (`epoll`, `kqueue`, @@ -52,7 +52,7 @@ //! //! Tokio consists of a number of modules that provide a range of functionality //! essential for implementing asynchronous applications in Rust. In this -//! section, we will take a brief tour of Tokio, summarizing the major APIs and +//! section, we will take a brief tour of Tokio, summarizing the major `APIs` and //! their uses. //! //! The easiest way to get started is to enable all features. Do this by @@ -149,7 +149,7 @@ //! Finally, Tokio provides a _runtime_ for executing asynchronous tasks. Most //! applications can use the [`#[tokio::main]`][main] macro to run their code on the //! Tokio runtime. However, this macro provides only basic configuration options. As -//! an alternative, the [`tokio::runtime`] module provides more powerful APIs for configuring +//! an alternative, the [`tokio::runtime`] module provides more powerful `APIs` for configuring //! and managing runtimes. You should use that module if the `#[tokio::main]` macro doesn't //! provide the functionality you need. //! @@ -234,13 +234,13 @@ //! functions for working with these traits, forming as an asynchronous //! counterpart to [`std::io`]. //! -//! Tokio also includes APIs for performing various kinds of I/O and interacting +//! Tokio also includes `APIs` for performing various kinds of I/O and interacting //! with the operating system asynchronously. These include: //! //! * [`tokio::net`], which contains non-blocking versions of [TCP], [UDP], and //! [Unix Domain Sockets][UDS] (enabled by the "net" feature flag), //! * [`tokio::fs`], similar to [`std::fs`] but for performing filesystem I/O -//! asynchronously (enabled by the "fs" feature flag), +//! asynchronously (enabled by the `"fs"` feature flag), //! * [`tokio::signal`], for asynchronously handling Unix and Windows OS signals //! (enabled by the "signal" feature flag), //! * [`tokio::process`], for spawning and managing child processes (enabled by @@ -309,7 +309,7 @@ //! case. Below is a list of the available feature flags. You may also notice //! above each function, struct and trait there is listed one or more feature flags //! that are required for that item to be used. If you are new to Tokio it is -//! recommended that you use the `full` feature flag which will enable all public APIs. +//! recommended that you use the `full` feature flag which will enable all public `APIs`. //! Beware though that this will pull in many extra dependencies that you may not //! need. //! @@ -333,7 +333,7 @@ //! - `parking_lot`: As a potential optimization, use the `_parking_lot_` crate's //! synchronization primitives internally. Also, this //! dependency is necessary to construct some of our primitives -//! in a const context. `MSRV` may increase according to the +//! in a `const` context. `MSRV` may increase according to the //! `_parking_lot_` release in use. //! //! _Note: `AsyncRead` and `AsyncWrite` traits do not require any features and are @@ -356,7 +356,7 @@ //! This flag enables **unstable** features. The public API of these features //! may break in 1.x releases. To enable these features, the `--cfg //! tokio_unstable` argument must be passed to `rustc` when compiling. This -//! serves to explicitly opt-in to features which may break semver conventions, +//! serves to explicitly opt-in to features which may break `semver` conventions, //! since Cargo [does not yet directly support such opt-ins][unstable features]. //! //! You can specify it in your project's `.cargo/config.toml` file: @@ -689,6 +689,6 @@ cfg_macros! { #[cfg(test)] fn is_unpin() {} -/// fuzz test (fuzz_linked_list) +/// fuzz test (`fuzz_linked_list`) #[cfg(fuzzing)] pub mod fuzz; diff --git a/tokio/src/loom/std/mutex.rs b/tokio/src/loom/std/mutex.rs index 7b8f9ba1e24..820448ba1de 100644 --- a/tokio/src/loom/std/mutex.rs +++ b/tokio/src/loom/std/mutex.rs @@ -1,7 +1,7 @@ use std::sync::{self, MutexGuard, TryLockError}; /// Adapter for `std::Mutex` that removes the poisoning aspects -/// from its api. +/// from its `api`. #[derive(Debug)] pub(crate) struct Mutex(sync::Mutex); diff --git a/tokio/src/net/udp.rs b/tokio/src/net/udp.rs index 9192317bbcc..9f182e7738e 100644 --- a/tokio/src/net/udp.rs +++ b/tokio/src/net/udp.rs @@ -13,7 +13,7 @@ cfg_io_util! { cfg_net! { /// A UDP socket. /// - /// UDP is "connectionless", unlike TCP. Meaning, regardless of what address you've bound to, a `UdpSocket` + /// UDP is `"connectionless"`, unlike TCP. Meaning, regardless of what address you've bound to, a `UdpSocket` /// is free to communicate with many different remotes. In tokio there are basically two main ways to use `UdpSocket`: /// /// * one to many: [`bind`](`UdpSocket::bind`) and use [`send_to`](`UdpSocket::send_to`) @@ -825,7 +825,7 @@ impl UdpSocket { /// address to which it is connected. On success, returns the number of /// bytes read. /// - /// This method must be called with valid byte array buf of sufficient size + /// This method must be called with valid byte array `buf` of sufficient size /// to hold the message bytes. If a message is too long to fit in the /// supplied buffer, excess bytes may be discarded. /// @@ -881,7 +881,7 @@ impl UdpSocket { /// Tries to receive data from the stream into the provided buffer, advancing the /// buffer's internal cursor, returning how many bytes were read. /// - /// This method must be called with valid byte array buf of sufficient size + /// This method must be called with valid byte array `buf` of sufficient size /// to hold the message bytes. If a message is too long to fit in the /// supplied buffer, excess bytes may be discarded. /// @@ -949,7 +949,7 @@ impl UdpSocket { /// to which it is connected, advancing the buffer's internal cursor, /// returning how many bytes were read. /// - /// This method must be called with valid byte array buf of sufficient size + /// This method must be called with valid byte array `buf` of sufficient size /// to hold the message bytes. If a message is too long to fit in the /// supplied buffer, excess bytes may be discarded. /// @@ -996,7 +996,7 @@ impl UdpSocket { /// Tries to receive a single datagram message on the socket. On success, /// returns the number of bytes read and the origin. /// - /// This method must be called with valid byte array buf of sufficient size + /// This method must be called with valid byte array `buf` of sufficient size /// to hold the message bytes. If a message is too long to fit in the /// supplied buffer, excess bytes may be discarded. /// @@ -1071,7 +1071,7 @@ impl UdpSocket { /// Receives a single datagram message on the socket, advancing the /// buffer's internal cursor, returning how many bytes were read and the origin. /// - /// This method must be called with valid byte array buf of sufficient size + /// This method must be called with valid byte array `buf` of sufficient size /// to hold the message bytes. If a message is too long to fit in the /// supplied buffer, excess bytes may be discarded. /// @@ -1360,7 +1360,7 @@ impl UdpSocket { /// Tries to receive a single datagram message on the socket. On success, /// returns the number of bytes read and the origin. /// - /// This method must be called with valid byte array buf of sufficient size + /// This method must be called with valid byte array `buf` of sufficient size /// to hold the message bytes. If a message is too long to fit in the /// supplied buffer, excess bytes may be discarded. /// diff --git a/tokio/src/process/mod.rs b/tokio/src/process/mod.rs index 0fad67cd01a..995ec88cba6 100644 --- a/tokio/src/process/mod.rs +++ b/tokio/src/process/mod.rs @@ -4,7 +4,7 @@ //! [`std::process::Command`] type in the standard library, but provides asynchronous versions of //! functions that create processes. These functions (`spawn`, `status`, `output` and their //! variants) return "future aware" types that interoperate with Tokio. The asynchronous process -//! support is provided through signal handling on Unix and system APIs on Windows. +//! support is provided through signal handling on Unix and system `APIs` on Windows. //! //! [`std::process::Command`]: std::process::Command //! diff --git a/tokio/src/runtime/blocking/mod.rs b/tokio/src/runtime/blocking/mod.rs index c42924be77d..c5bcc5fb5cc 100644 --- a/tokio/src/runtime/blocking/mod.rs +++ b/tokio/src/runtime/blocking/mod.rs @@ -1,5 +1,5 @@ -//! Abstracts out the APIs necessary to `Runtime` for integrating the blocking -//! pool. When the `blocking` feature flag is **not** enabled, these APIs are +//! Abstracts out the `APIs` necessary to `Runtime` for integrating the blocking +//! pool. When the `blocking` feature flag is **not** enabled, these `APIs` are //! shells. This isolates the complexity of dealing with conditional //! compilation. diff --git a/tokio/src/runtime/context.rs b/tokio/src/runtime/context.rs index 62e4fc9474c..e142629c210 100644 --- a/tokio/src/runtime/context.rs +++ b/tokio/src/runtime/context.rs @@ -42,7 +42,7 @@ struct Context { #[cfg(feature = "rt")] current: current::HandleCell, - /// Handle to the scheduler's internal "context" + /// Handle to the `scheduler's` internal "context" #[cfg(feature = "rt")] scheduler: Scoped, diff --git a/tokio/src/runtime/handle.rs b/tokio/src/runtime/handle.rs index 7a866367ae6..7e7e5636c80 100644 --- a/tokio/src/runtime/handle.rs +++ b/tokio/src/runtime/handle.rs @@ -475,7 +475,7 @@ cfg_taskdump! { /// ## Unstable Features /// /// This functionality is **unstable**, and requires both the - /// `tokio_unstable` and `tokio_taskdump` cfg flags to be set. + /// `tokio_unstable` and `tokio_taskdump` `cfg` flags to be set. /// /// You can do this by setting the `RUSTFLAGS` environment variable /// before invoking `cargo`; e.g.: diff --git a/tokio/src/runtime/scheduler/multi_thread/worker.rs b/tokio/src/runtime/scheduler/multi_thread/worker.rs index 2bd1b5678ea..235087f4b3a 100644 --- a/tokio/src/runtime/scheduler/multi_thread/worker.rs +++ b/tokio/src/runtime/scheduler/multi_thread/worker.rs @@ -88,7 +88,7 @@ cfg_not_taskdump! { /// A scheduler worker pub(super) struct Worker { - /// Reference to scheduler's handle + /// Reference to `scheduler's` handle handle: Arc, /// Index holding this worker's remote state @@ -184,7 +184,7 @@ pub(crate) struct Shared { /// Only held to trigger some code on drop. This is used to get internal /// runtime metrics that can be useful when doing performance /// investigations. This does nothing (empty struct, no drop impl) unless - /// the `tokio_internal_mt_counters` cfg flag is set. + /// the `tokio_internal_mt_counters` `cfg` flag is set. _counters: Counters, } @@ -995,7 +995,7 @@ impl Core { } impl Worker { - /// Returns a reference to the scheduler's injection queue. + /// Returns a reference to the `scheduler's` injection queue. fn inject(&self) -> &inject::Shared> { &self.handle.shared.inject } diff --git a/tokio/src/runtime/scheduler/multi_thread_alt/worker.rs b/tokio/src/runtime/scheduler/multi_thread_alt/worker.rs index e24d0b2e541..54c6b0ed7ba 100644 --- a/tokio/src/runtime/scheduler/multi_thread_alt/worker.rs +++ b/tokio/src/runtime/scheduler/multi_thread_alt/worker.rs @@ -174,7 +174,7 @@ pub(crate) struct Shared { /// Only held to trigger some code on drop. This is used to get internal /// runtime metrics that can be useful when doing performance /// investigations. This does nothing (empty struct, no drop impl) unless - /// the `tokio_internal_mt_counters` cfg flag is set. + /// the `tokio_internal_mt_counters` `cfg` flag is set. _counters: Counters, } diff --git a/tokio/src/runtime/task/core.rs b/tokio/src/runtime/task/core.rs index e61bbe5061d..108b06bc8b6 100644 --- a/tokio/src/runtime/task/core.rs +++ b/tokio/src/runtime/task/core.rs @@ -28,7 +28,7 @@ use std::task::{Context, Poll, Waker}; /// be referenced by both *mut Cell and *mut Header. /// /// Any changes to the layout of this struct _must_ also be reflected in the -/// const fns in raw.rs. +/// `const` fns in raw.rs. /// // # This struct should be cache padded to avoid false sharing. The cache padding rules are copied // from crossbeam-utils/src/cache_padded.rs @@ -132,7 +132,7 @@ pub(super) struct CoreStage { /// Holds the future or output, depending on the stage of execution. /// /// Any changes to the layout of this struct _must_ also be reflected in the -/// const fns in raw.rs. +/// `const` fns in raw.rs. #[repr(C)] pub(super) struct Core { /// Scheduler used to drive this future. diff --git a/tokio/src/runtime/task/mod.rs b/tokio/src/runtime/task/mod.rs index 6b05f4d7d5c..9238d52c68b 100644 --- a/tokio/src/runtime/task/mod.rs +++ b/tokio/src/runtime/task/mod.rs @@ -31,8 +31,8 @@ //! //! # State //! -//! The task stores its state in an atomic `usize` with various bitfields for the -//! necessary information. The state has the following bitfields: +//! The task stores its state in an atomic `usize` with various `bitfields` for the +//! necessary information. The state has the following `bitfields`: //! //! * `RUNNING` - Tracks whether the task is currently being polled or cancelled. //! This bit functions as a lock around the task. @@ -68,7 +68,7 @@ //! synchronization. //! //! * If COMPLETE is one, then the `JoinHandle` has exclusive access to the -//! stage field. If COMPLETE is zero, then the RUNNING bitfield functions as +//! stage field. If COMPLETE is zero, then the RUNNING `bitfield` functions as //! a lock for the stage field, and it can be accessed only by the thread //! that set RUNNING to one. //! @@ -159,7 +159,7 @@ //! //! Calling poll from inside a shutdown call or vice-versa is not prevented by //! the API exposed by the task module, so this has to be safe. In either case, -//! the lock in the RUNNING bitfield makes the inner call return immediately. If +//! the lock in the RUNNING `bitfield` makes the inner call return immediately. If //! the inner call is a `shutdown` call, then the CANCELLED bit is set, and the //! poll call will notice it when the poll finishes, and the task is cancelled //! at that point. diff --git a/tokio/src/runtime/time/entry.rs b/tokio/src/runtime/time/entry.rs index 0998b53011d..48d5f4cf7d7 100644 --- a/tokio/src/runtime/time/entry.rs +++ b/tokio/src/runtime/time/entry.rs @@ -332,7 +332,7 @@ pub(crate) struct TimerHandle { pub(super) type EntryList = crate::util::linked_list::LinkedList; /// The shared state structure of a timer. This structure is shared between the -/// frontend (`Entry`) and driver backend. +/// `frontend` (`Entry`) and driver backend. /// /// Note that this structure is located inside the `TimerEntry` structure. pub(crate) struct TimerShared { diff --git a/tokio/src/signal/windows.rs b/tokio/src/signal/windows.rs index e6ca599de70..d8af9b4c9d9 100644 --- a/tokio/src/signal/windows.rs +++ b/tokio/src/signal/windows.rs @@ -257,7 +257,7 @@ pub fn ctrl_close() -> io::Result { }) } -/// Represents a listener which receives "ctrl-close" notitifications sent to the process +/// Represents a listener which receives "ctrl-close" notifications sent to the process /// via `SetConsoleCtrlHandler`. /// /// A notification to this process notifies *all* listeners listening for @@ -354,7 +354,7 @@ pub fn ctrl_shutdown() -> io::Result { }) } -/// Represents a listener which receives "ctrl-shutdown" notitifications sent to the process +/// Represents a listener which receives "ctrl-shutdown" notifications sent to the process /// via `SetConsoleCtrlHandler`. /// /// A notification to this process notifies *all* listeners listening for @@ -451,7 +451,7 @@ pub fn ctrl_logoff() -> io::Result { }) } -/// Represents a listener which receives "ctrl-logoff" notitifications sent to the process +/// Represents a listener which receives "ctrl-logoff" notifications sent to the process /// via `SetConsoleCtrlHandler`. /// /// A notification to this process notifies *all* listeners listening for diff --git a/tokio/src/sync/mpsc/block.rs b/tokio/src/sync/mpsc/block.rs index befcfd29efa..0598f54ab34 100644 --- a/tokio/src/sync/mpsc/block.rs +++ b/tokio/src/sync/mpsc/block.rs @@ -30,7 +30,7 @@ struct BlockHeader { /// The next block in the linked list. next: AtomicPtr>, - /// Bitfield tracking slots that are ready to have their values consumed. + /// `Bitfield` tracking slots that are ready to have their values consumed. ready_slots: AtomicUsize, /// The observed `tail_position` value *after* the block has been passed by diff --git a/tokio/src/task/blocking.rs b/tokio/src/task/blocking.rs index 1cce466394e..ddd5e1c463c 100644 --- a/tokio/src/task/blocking.rs +++ b/tokio/src/task/blocking.rs @@ -121,9 +121,9 @@ cfg_rt! { /// /// Note that if you are using the single threaded runtime, this function will /// still spawn additional threads for blocking operations. The current-thread - /// scheduler's single thread is only used for asynchronous code. + /// `scheduler's` single thread is only used for asynchronous code. /// - /// # Related APIs and patterns for bridging asynchronous and blocking code + /// # Related `APIs` and patterns for bridging asynchronous and blocking code /// /// In simple cases, it is sufficient to have the closure accept input /// parameters at creation time and return a single value (or struct/tuple, etc.). diff --git a/tokio/src/task/mod.rs b/tokio/src/task/mod.rs index 806b9aebe76..347fed2c078 100644 --- a/tokio/src/task/mod.rs +++ b/tokio/src/task/mod.rs @@ -33,7 +33,7 @@ //! yield instead, allowing the Tokio runtime to schedule another task. Tasks //! should generally not perform system calls or other operations that could //! block a thread, as this would prevent other tasks running on the same -//! thread from executing as well. Instead, this module provides APIs for +//! thread from executing as well. Instead, this module provides `APIs` for //! running blocking operations in an asynchronous context. //! //! [rt]: crate::runtime @@ -44,7 +44,7 @@ //! //! ## Working with Tasks //! -//! This module provides the following APIs for working with tasks: +//! This module provides the following `APIs` for working with tasks: //! //! ### Spawning //! @@ -159,7 +159,7 @@ //! on a thread that is also running other tasks would block the entire thread, //! preventing other tasks from running. //! -//! Instead, Tokio provides two APIs for running blocking operations in an +//! Instead, Tokio provides two `APIs` for running blocking operations in an //! asynchronous context: [`task::spawn_blocking`] and [`task::block_in_place`]. //! //! Be aware that if you call a non-async method from async code, that non-async diff --git a/tokio/src/util/linked_list.rs b/tokio/src/util/linked_list.rs index 0ed2b616456..24be18491ab 100644 --- a/tokio/src/util/linked_list.rs +++ b/tokio/src/util/linked_list.rs @@ -3,7 +3,7 @@ //! An intrusive double linked list of data. //! //! The data structure supports tracking pinned nodes. Most of the data -//! structure's APIs are `unsafe` as they require the caller to ensure the +//! structure's `APIs` are `unsafe` as they require the caller to ensure the //! specified node is actually contained by the list. use core::cell::UnsafeCell; diff --git a/tokio/src/util/sharded_list.rs b/tokio/src/util/sharded_list.rs index 8c8e3ad0a02..4da0bcdf7f1 100644 --- a/tokio/src/util/sharded_list.rs +++ b/tokio/src/util/sharded_list.rs @@ -56,7 +56,7 @@ pub(crate) struct ShardGuard<'a, L, T> { } impl ShardedList { - /// Removes the last element from a list specified by shard_id and returns it, or None if it is + /// Removes the last element from a list specified by `shard_id` and returns it, or None if it is /// empty. pub(crate) fn pop_back(&self, shard_id: usize) -> Option { let mut lock = self.shard_inner(shard_id);