Skip to content

Commit

Permalink
add must_use attributes on Future and Stream
Browse files Browse the repository at this point in the history
  • Loading branch information
Speedy37 authored and cramertj committed Sep 5, 2019
1 parent 632838c commit ad7830d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ use {Poll, stream};
/// More information about combinators can be found [on tokio.rs].
///
/// [on tokio.rs]: https://tokio.rs/docs/going-deeper-futures/futures-mechanics/
#[must_use = "futures do nothing unless polled"]
pub trait Future {
/// The type of value that this future will resolved with if it is
/// successful.
Expand Down
1 change: 1 addition & 0 deletions src/stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ if_std! {
/// please feel welcome to comment on [the issue][being considered]!
///
/// [being considered]: https://github.com/rust-lang-nursery/futures-rs/issues/206
#[must_use = "streams do nothing unless polled"]
pub trait Stream {
/// The type of item this stream will yield on success.
type Item;
Expand Down

0 comments on commit ad7830d

Please sign in to comment.