Add #[must_use] to core::task::Poll

This commit is contained in:
Taiki Endo 2019-02-04 22:41:39 +09:00
parent 8ae730a442
commit 4847c097b4

View File

@ -7,6 +7,7 @@ use result::Result;
/// Indicates whether a value is available or if the current task has been
/// scheduled to receive a wakeup instead.
#[must_use = "this `Poll` may be a `Pending` variant, which should be handled"]
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum Poll<T> {
/// Represents that a value is immediately ready.