aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwackazong <[email protected]>2025-02-04 17:12:26 +0100
committerGitHub <[email protected]>2025-02-04 17:12:26 +0100
commit0f048783010a6ca582b23cc06bcb47bd6ebf6fe8 (patch)
treeb2c2f9a534d1e647f1e359b393183c9e974f9d5d
parentd3059bbcf7fcf5acd84a8f672c0d0073e323f73b (diff)
Add must_use to MutexGuard
-rw-r--r--embassy-sync/src/mutex.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-sync/src/mutex.rs b/embassy-sync/src/mutex.rs
index f25f74336..7528a9f68 100644
--- a/embassy-sync/src/mutex.rs
+++ b/embassy-sync/src/mutex.rs
@@ -171,6 +171,7 @@ where
171/// 171///
172/// Dropping it unlocks the mutex. 172/// Dropping it unlocks the mutex.
173#[clippy::has_significant_drop] 173#[clippy::has_significant_drop]
174#[must_use = "if unused the Mutex will immediately unlock"]
174pub struct MutexGuard<'a, M, T> 175pub struct MutexGuard<'a, M, T>
175where 176where
176 M: RawMutex, 177 M: RawMutex,