Skip to content

Commit

Permalink
task: add #[must_use] to JoinHandle::abort_handle (#6762)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainad2222 authored Aug 9, 2024
1 parent a491b16 commit 6ad1912
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tokio/src/runtime/task/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ impl<T> JoinHandle<T> {
/// # }
/// ```
/// [cancelled]: method@super::error::JoinError::is_cancelled
#[must_use = "abort handles do nothing unless `.abort` is called"]
pub fn abort_handle(&self) -> super::AbortHandle {
self.raw.ref_inc();
super::AbortHandle::new(self.raw)
Expand Down

0 comments on commit 6ad1912

Please sign in to comment.