Add must_use to MutexGuard

This commit is contained in:
wackazong 2025-02-04 17:12:26 +01:00 committed by GitHub
parent d3059bbcf7
commit 0f04878301
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,