Set Sink types as must_use

This commit is contained in:
Taylor Cramer 2017-10-25 18:03:31 -07:00
parent bd9a07f3ad
commit 7624061021
2 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ use reactor::{Handle, PollEvented};
/// This type is created by the [`channel`] function.
///
/// [`channel`]: fn.channel.html
#[must_use = "sinks do nothing unless polled"]
pub struct Sender<T> {
tx: channel::Sender<T>,
}

View File

@ -55,6 +55,7 @@ pub trait UdpCodec {
///
/// You can acquire a `UdpFramed` instance by using the `UdpSocket::framed`
/// adapter.
#[must_use = "sinks do nothing unless polled"]
pub struct UdpFramed<C> {
socket: UdpSocket,
codec: C,