From 0700d6a7cdbb36c1f084e60121fc4defdac46923 Mon Sep 17 00:00:00 2001 From: Marek Kuskowski <50183564+nylonicious@users.noreply.github.com> Date: Fri, 29 Sep 2023 16:43:38 +0200 Subject: [PATCH] io: mark `Interest::add` with `#[must_use]` (#6037) --- tokio/src/io/interest.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tokio/src/io/interest.rs b/tokio/src/io/interest.rs index cf6d270e0c6..e823910d1b6 100644 --- a/tokio/src/io/interest.rs +++ b/tokio/src/io/interest.rs @@ -163,6 +163,7 @@ impl Interest { /// /// assert!(BOTH.is_readable()); /// assert!(BOTH.is_writable()); + #[must_use = "this returns the result of the operation, without modifying the original"] pub const fn add(self, other: Interest) -> Interest { Self(self.0 | other.0) }