mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +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
|
||||
/// 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>>,
|
||||
|
||||
Reference in New Issue
Block a user