mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
test: mark Spawn as #[must_use] (#6371)
This commit is contained in:
@@ -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
|
/// Future spawned on a mock task that can be used to poll the future or stream
|
||||||
/// without needing pinning or context types.
|
/// without needing pinning or context types.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[must_use = "futures do nothing unless you `.await` or poll them"]
|
||||||
pub struct Spawn<T> {
|
pub struct Spawn<T> {
|
||||||
task: MockTask,
|
task: MockTask,
|
||||||
future: Pin<Box<T>>,
|
future: Pin<Box<T>>,
|
||||||
|
|||||||
Reference in New Issue
Block a user