mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
test: mark Spawn
as #[must_use]
(#6371)
This commit is contained in:
parent
f5ca423bf1
commit
f6d061919f
@ -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>>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user