Skip to content

Commit

Permalink
test: mark Spawn as #[must_use] (#6371)
Browse files Browse the repository at this point in the history
  • Loading branch information
mox692 authored Mar 4, 2024
1 parent f5ca423 commit f6d0619
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tokio-test/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub fn spawn<T>(task: T) -> Spawn<T> {
/// Future spawned on a mock task that can be used to poll the future or stream
/// without needing pinning or context types.
#[derive(Debug)]
#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Spawn<T> {
task: MockTask,
future: Pin<Box<T>>,
Expand Down

0 comments on commit f6d0619

Please sign in to comment.