summaryrefslogtreecommitdiff
path: root/src/poisonable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/poisonable.rs')
-rwxr-xr-xsrc/poisonable.rs33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/poisonable.rs b/src/poisonable.rs
index ac0e1bf..8dada90 100755
--- a/src/poisonable.rs
+++ b/src/poisonable.rs
@@ -140,7 +140,7 @@ mod tests {
use std::sync::Arc;
use super::*;
- use crate::lockable::Lockable;
+ use crate::lockable::Lockable as _;
use crate::{LockCollection, Mutex, RwLock, ThreadKey};
#[test]
@@ -156,7 +156,7 @@ mod tests {
assert_eq!(**guard, 42);
panic!();
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard1);
})
.join()
@@ -181,7 +181,7 @@ mod tests {
assert_eq!(**guard, 42);
panic!();
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard1);
})
.join()
@@ -207,10 +207,10 @@ mod tests {
let _ = std::panic::catch_unwind(|| {
let key = ThreadKey::get().unwrap();
- #[allow(unused_variables)]
+ #[expect(unused_variables)]
let guard = mutex.lock(key);
panic!();
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard);
});
@@ -231,10 +231,10 @@ mod tests {
std::panic::catch_unwind(|| {
let key = ThreadKey::get().unwrap();
- #[allow(unused_variables)]
+ #[expect(unused_variables)]
let guard = mutex.lock(key);
panic!();
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard);
})
.unwrap_err();
@@ -255,10 +255,10 @@ mod tests {
std::panic::catch_unwind(|| {
let key = ThreadKey::get().unwrap();
- #[allow(unused_variables)]
+ #[expect(unused_variables)]
let guard = mutex.lock(key);
panic!();
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard);
})
.unwrap_err();
@@ -527,12 +527,11 @@ mod tests {
let _ = std::panic::catch_unwind(|| {
let key = ThreadKey::get().unwrap();
- #[allow(unused_variables)]
+ #[expect(unused_variables)]
let guard = mutex.lock(key);
panic!();
- #[allow(unknown_lints)]
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard);
});
@@ -549,12 +548,11 @@ mod tests {
let _ = std::panic::catch_unwind(|| {
let key = ThreadKey::get().unwrap();
- #[allow(unused_variables)]
+ #[expect(unused_variables)]
let guard = mutex.lock(key);
panic!();
- #[allow(unknown_lints)]
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard);
});
@@ -577,12 +575,11 @@ mod tests {
let _ = std::panic::catch_unwind(|| {
let key = ThreadKey::get().unwrap();
- #[allow(unused_variables)]
+ #[expect(unused_variables)]
let guard = mutex.lock(key);
panic!();
- #[allow(unknown_lints)]
- #[allow(unreachable_code)]
+ #[expect(unreachable_code)]
drop(guard);
});