From 762406102161029b72874195939751a91c0c6186 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Wed, 25 Oct 2017 18:03:31 -0700 Subject: [PATCH] Set Sink types as must_use --- src/channel.rs | 1 + src/net/udp/frame.rs | 1 + 2 files changed, 2 insertions(+) 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,