From 0f048783010a6ca582b23cc06bcb47bd6ebf6fe8 Mon Sep 17 00:00:00 2001 From: wackazong Date: Tue, 4 Feb 2025 17:12:26 +0100 Subject: [PATCH] Add must_use to MutexGuard --- embassy-sync/src/mutex.rs | 1 + 1 file changed, 1 insertion(+) 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 /// /// Dropping it unlocks the mutex. #[clippy::has_significant_drop] +#[must_use = "if unused the Mutex will immediately unlock"] pub struct MutexGuard<'a, M, T> where M: RawMutex,