mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
Set Future types as must_use
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user