Skip to content
This repository was archived by the owner on Oct 30, 2019. It is now read-only.

Commit c290baf

Browse files
committed
fix false must_use warning on JoinHandle
Removes the must_use requirement on the JoinHandle, since it is the result of a future being spawned - thus, the originating future will be polled to completion, whether or not the JoinHandle is polled.
1 parent b585c4f commit c290baf

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/task.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ where
8585
/// A handle that awaits the result of a [`spawn`]ed future.
8686
///
8787
/// [`spawn`]: fn.spawn.html
88-
#[must_use = "futures do nothing unless you `.await` or poll them"]
8988
#[derive(Debug)]
9089
pub struct JoinHandle<T> {
9190
pub(crate) rx: futures::channel::oneshot::Receiver<T>,

0 commit comments

Comments
 (0)