From 2e4aefa7fc19e4d66152332d28baafe1349c1636 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 26 Jan 2023 16:10:45 -0800 Subject: Annotate `Command` and `Subscription` with `#[must_use]` Calling a function returning one of these types without using it is almost certainly a mistake. Luckily Rust's `#[must_use]` can help warn about this. --- futures/src/subscription.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'futures/src/subscription.rs') diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index e96fa704..d18ec4f7 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -20,6 +20,7 @@ use crate::BoxStream; /// `Hasher`. /// /// [`Command`]: crate::Command +#[must_use = "`Subscription` must be returned to runtime to take effect"] pub struct Subscription { recipes: Vec>>, } -- cgit