diff --git a/src/channel.rs b/src/channel.rs index 85060e52b..e9e023867 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -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 { tx: channel::Sender, } diff --git a/src/net/udp/frame.rs b/src/net/udp/frame.rs index 1bb5deed6..5ae41b738 100644 --- a/src/net/udp/frame.rs +++ b/src/net/udp/frame.rs @@ -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 { socket: UdpSocket, codec: C,