sync: Add #[must_use] to the Mutex guard.
This helps people remember to save the return value to keep the mutex locked as appropriate.
This commit is contained in:
parent
0937f65999
commit
0f4294b4e2
1 changed files with 1 additions and 0 deletions
|
|
@ -143,6 +143,7 @@ pub struct StaticMutex {
|
|||
|
||||
/// An RAII implementation of a "scoped lock" of a mutex. When this structure is
|
||||
/// dropped (falls out of scope), the lock will be unlocked.
|
||||
#[must_use]
|
||||
pub struct Guard<'a> {
|
||||
priv lock: &'a mut StaticMutex,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue