task: add #[must_use] to JoinHandle::abort_handle (#6762)

This commit is contained in:
Sainath Singineedi 2024-08-10 02:27:31 +05:30 committed by GitHub
parent a491b16a89
commit 6ad1912353
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)