Skip to content

Commit

Permalink
Fix must_use messages
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e authored and cramertj committed Aug 27, 2019
1 parent 4fc1b7d commit a5f3870
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions futures-util/src/io/chain.rs
Expand Up @@ -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<T, U> {
first: T,
second: U,
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/io/empty.rs
Expand Up @@ -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: (),
}
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/io/repeat.rs
Expand Up @@ -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,
}
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/io/sink.rs
Expand Up @@ -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: (),
}
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/io/take.rs
Expand Up @@ -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<R> {
inner: R,
// Add '_' to avoid conflicts with `limit` method.
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/try_stream/into_async_read.rs
Expand Up @@ -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<St>
where
St: TryStream<Error = Error> + Unpin,
Expand Down

0 comments on commit a5f3870

Please sign in to comment.