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

This commit is contained in:
Sainath Singineedi
2024-08-09 20:57:31 +00:00
committed by GitHub
parent a491b16a89
commit 6ad1912353
+1
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)