diff options
| author | James Munns <[email protected]> | 2025-02-04 16:18:08 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-02-04 16:18:08 +0000 |
| commit | a2014c961d5ed1ebb665542aba208c60c9071cd5 (patch) | |
| tree | b2c2f9a534d1e647f1e359b393183c9e974f9d5d | |
| parent | d3059bbcf7fcf5acd84a8f672c0d0073e323f73b (diff) | |
| parent | 0f048783010a6ca582b23cc06bcb47bd6ebf6fe8 (diff) | |
Merge pull request #3848 from wackazong/patch-5
Add must_use to MutexGuard
| -rw-r--r-- | embassy-sync/src/mutex.rs | 1 |
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"] | ||
| 174 | pub struct MutexGuard<'a, M, T> | 175 | pub struct MutexGuard<'a, M, T> |
| 175 | where | 176 | where |
| 176 | M: RawMutex, | 177 | M: RawMutex, |
