Skip to content

Commit

Permalink
Add #[must_use] to Future types
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeaurivage committed Dec 15, 2023
1 parent 2f1b4cd commit 81f9a84
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub trait Instrument {
}

pin_project_lite::pin_project! {
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[doc(hidden)]
pub struct TraceTaskFuture<'a, F, I>
where
Expand Down Expand Up @@ -197,6 +198,7 @@ where
}

pin_project_lite::pin_project! {
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[doc(hidden)]
pub struct TracePollFuture<'a, F, I>
where
Expand Down Expand Up @@ -234,6 +236,7 @@ where
}

pin_project_lite::pin_project! {
#[must_use = "futures do nothing unless you `.await` or poll them"]
#[doc(hidden)]
pub struct TraceTaskAndPollFuture<'a, F, T, P>
where
Expand Down

0 comments on commit 81f9a84

Please sign in to comment.