diff options
| author | wackazong <[email protected]> | 2025-02-04 17:12:26 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-02-04 17:12:26 +0100 |
| commit | 0f048783010a6ca582b23cc06bcb47bd6ebf6fe8 (patch) | |
| tree | b2c2f9a534d1e647f1e359b393183c9e974f9d5d | |
| parent | d3059bbcf7fcf5acd84a8f672c0d0073e323f73b (diff) | |
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, |
