From 10ed5ddaecdea039cbc5cb23443d6b416a8a3d4e Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 27 Aug 2019 20:32:45 +0900 Subject: [PATCH] Fix must_use messages --- futures-util/src/io/chain.rs | 4 ++-- futures-util/src/io/empty.rs | 4 ++-- futures-util/src/io/repeat.rs | 4 ++-- futures-util/src/io/sink.rs | 4 ++-- futures-util/src/io/take.rs | 4 ++-- futures-util/src/try_stream/into_async_read.rs | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/futures-util/src/io/chain.rs b/futures-util/src/io/chain.rs index 15758e3a07..35adfdbbc4 100644 --- a/futures-util/src/io/chain.rs +++ b/futures-util/src/io/chain.rs @@ -5,8 +5,8 @@ use std::fmt; use std::io; use std::pin::Pin; -/// Stream for the [`chain`](super::AsyncReadExt::chain) method. -#[must_use = "streams do nothing unless polled"] +/// Reader for the [`chain`](super::AsyncReadExt::chain) method. +#[must_use = "readers do nothing unless polled"] pub struct Chain { first: T, second: U, diff --git a/futures-util/src/io/empty.rs b/futures-util/src/io/empty.rs index daa7c3f17e..58e0d52fd6 100644 --- a/futures-util/src/io/empty.rs +++ b/futures-util/src/io/empty.rs @@ -4,8 +4,8 @@ use std::fmt; use std::io; use std::pin::Pin; -/// Stream for the [`empty()`] function. -#[must_use = "streams do nothing unless polled"] +/// Reader for the [`empty()`] function. +#[must_use = "readers do nothing unless polled"] pub struct Empty { _priv: (), } diff --git a/futures-util/src/io/repeat.rs b/futures-util/src/io/repeat.rs index f94ae628d7..0821ec9b04 100644 --- a/futures-util/src/io/repeat.rs +++ b/futures-util/src/io/repeat.rs @@ -4,8 +4,8 @@ use std::fmt; use std::io; use std::pin::Pin; -/// Stream for the [`repeat()`] function. -#[must_use = "streams do nothing unless polled"] +/// Reader for the [`repeat()`] function. +#[must_use = "readers do nothing unless polled"] pub struct Repeat { byte: u8, } diff --git a/futures-util/src/io/sink.rs b/futures-util/src/io/sink.rs index 5b9ae4fa6f..4a32ca7041 100644 --- a/futures-util/src/io/sink.rs +++ b/futures-util/src/io/sink.rs @@ -4,8 +4,8 @@ use std::fmt; use std::io; use std::pin::Pin; -/// Stream for the [`sink()`] function. -#[must_use = "streams do nothing unless polled"] +/// Writer for the [`sink()`] function. +#[must_use = "writers do nothing unless polled"] pub struct Sink { _priv: (), } diff --git a/futures-util/src/io/take.rs b/futures-util/src/io/take.rs index 9736250d74..3951371458 100644 --- a/futures-util/src/io/take.rs +++ b/futures-util/src/io/take.rs @@ -4,9 +4,9 @@ use pin_utils::{unsafe_pinned, unsafe_unpinned}; use std::{cmp, io}; use std::pin::Pin; -/// Future for the [`take`](super::AsyncReadExt::take) method. +/// Reader for the [`take`](super::AsyncReadExt::take) method. #[derive(Debug)] -#[must_use = "futures do nothing unless you `.await` or poll them"] +#[must_use = "readers do nothing unless you `.await` or poll them"] pub struct Take { inner: R, // Add '_' to avoid conflicts with `limit` method. diff --git a/futures-util/src/try_stream/into_async_read.rs b/futures-util/src/try_stream/into_async_read.rs index 374299a51f..e053b1b75a 100644 --- a/futures-util/src/try_stream/into_async_read.rs +++ b/futures-util/src/try_stream/into_async_read.rs @@ -6,9 +6,9 @@ use futures_io::{AsyncRead, AsyncWrite, AsyncBufRead}; use std::cmp; use std::io::{Error, Result}; -/// An `AsyncRead` for the [`into_async_read`](super::TryStreamExt::into_async_read) combinator. +/// Reader for the [`into_async_read`](super::TryStreamExt::into_async_read) method. #[derive(Debug)] -#[must_use = "streams do nothing unless polled"] +#[must_use = "readers do nothing unless polled"] pub struct IntoAsyncRead where St: TryStream + Unpin,