add #[must_use] to more futures and streams (#1309)

This commit is contained in:
Taiki Endo
2019-07-15 13:28:56 -07:00
committed by Carl Lerche
parent 2dde2b448f
commit b14e189e44
34 changed files with 35 additions and 12 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ use std::task::{Context, Poll};
/// A future that receives a datagram from the connected address.
///
/// This `struct` is created by [`recv`](super::UdpSocket::recv).
#[must_use = "futures do nothing unless polled"]
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[derive(Debug)]
pub struct Recv<'a, 'b> {
socket: &'a UdpSocket,
+1 -1
View File
@@ -8,7 +8,7 @@ use std::task::{Context, Poll};
/// A future that receives a datagram.
///
/// This `struct` is created by [`recv_from`](super::UdpSocket::recv_from).
#[must_use = "futures do nothing unless polled"]
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[derive(Debug)]
pub struct RecvFrom<'a, 'b> {
socket: &'a UdpSocket,
+1 -1
View File
@@ -7,7 +7,7 @@ use std::task::{Context, Poll};
/// A future that sends a datagram to the connected address.
///
/// This `struct` is created by [`send`](super::UdpSocket::send).
#[must_use = "futures do nothing unless polled"]
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[derive(Debug)]
pub struct Send<'a, 'b> {
socket: &'a UdpSocket,
+1 -1
View File
@@ -8,7 +8,7 @@ use std::task::{Context, Poll};
/// A future that sends a datagram to a given address.
///
/// This `struct` is created by [`send_to`](super::UdpSocket::send_to).
#[must_use = "futures do nothing unless polled"]
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[derive(Debug)]
pub struct SendTo<'a, 'b> {
socket: &'a UdpSocket,