mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
chore: clippy and doc fixes (#6081)
This commit is contained in:
@@ -133,7 +133,7 @@ impl Default for CancellationToken {
|
||||
}
|
||||
|
||||
impl CancellationToken {
|
||||
/// Creates a new CancellationToken in the non-cancelled state.
|
||||
/// Creates a new `CancellationToken` in the non-cancelled state.
|
||||
pub fn new() -> CancellationToken {
|
||||
CancellationToken {
|
||||
inner: Arc::new(tree_node::TreeNode::new()),
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//! This mod provides the logic for the inner tree structure of the CancellationToken.
|
||||
//!
|
||||
//! CancellationTokens are only light handles with references to TreeNode.
|
||||
//! All the logic is actually implemented in the TreeNode.
|
||||
//! CancellationTokens are only light handles with references to [`TreeNode`].
|
||||
//! All the logic is actually implemented in the [`TreeNode`].
|
||||
//!
|
||||
//! A TreeNode is part of the cancellation tree and may have one parent and an arbitrary number of
|
||||
//! A [`TreeNode`] is part of the cancellation tree and may have one parent and an arbitrary number of
|
||||
//! children.
|
||||
//!
|
||||
//! A TreeNode can receive the request to perform a cancellation through a CancellationToken.
|
||||
//! A [`TreeNode`] can receive the request to perform a cancellation through a CancellationToken.
|
||||
//! This cancellation request will cancel the node and all of its descendants.
|
||||
//!
|
||||
//! As soon as a node cannot get cancelled any more (because it was already cancelled or it has no
|
||||
|
||||
@@ -29,7 +29,7 @@ impl PollSemaphore {
|
||||
|
||||
/// Closes the semaphore.
|
||||
pub fn close(&self) {
|
||||
self.semaphore.close()
|
||||
self.semaphore.close();
|
||||
}
|
||||
|
||||
/// Obtain a clone of the inner semaphore.
|
||||
|
||||
Reference in New Issue
Block a user