add must_use for Future (#450)

This commit is contained in:
Guanqun Lu
2018-09-04 18:30:57 +08:00
committed by Toralf Wittner
parent 02576eecf1
commit ee9be6f0c9
11 changed files with 14 additions and 0 deletions

View File

@ -222,6 +222,7 @@ where
}
/// Future that must be driven to completion in order for the swarm to work.
#[must_use = "futures do nothing unless polled"]
pub struct SwarmFuture<T, H>
where
T: MuxedTransport + 'static, // TODO: 'static :-/