This commit is contained in:
Chris Copeland 2024-04-01 00:07:32 -07:00
parent 0c741c117c
commit 634a007749
Signed by: chrisnc
GPG Key ID: 14550DA72485DF30
1 changed files with 3 additions and 1 deletions

View File

@ -152,7 +152,9 @@ mod tests {
fn try_lock() {
test_init();
mutex!(MUTEX, i32, 0);
if let Some(mut x) = MUTEX.try_lock() { *x += 1; }
if let Some(mut x) = MUTEX.try_lock() {
*x += 1;
}
assert!(*MUTEX.lock() == 1);
}
}