mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
task: add #[must_use] to JoinHandle::abort_handle (#6762)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user