Set Future types as must_use

This commit is contained in:
Taylor Cramer
2017-10-25 17:57:25 -07:00
parent 01198532c1
commit b4fa47bd09
10 changed files with 12 additions and 0 deletions
+2
View File
@@ -235,10 +235,12 @@ pub struct TcpStream {
/// Future returned by `TcpStream::connect` which will resolve to a `TcpStream`
/// when the stream is connected.
#[must_use = "futures do nothing unless polled"]
pub struct TcpStreamNew {
inner: TcpStreamNewState,
}
#[must_use = "futures do nothing unless polled"]
enum TcpStreamNewState {
Waiting(TcpStream),
Error(io::Error),