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

View File

@@ -171,6 +171,7 @@ where
/// ///
/// Dropping it unlocks the mutex. /// Dropping it unlocks the mutex.
#[clippy::has_significant_drop] #[clippy::has_significant_drop]
#[must_use = "if unused the Mutex will immediately unlock"]
pub struct MutexGuard<'a, M, T> pub struct MutexGuard<'a, M, T>
where where
M: RawMutex, M: RawMutex,