From 482b47f4ed786946acb324b60d9f7ae7dd8cc075 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sat, 14 Mar 2026 21:33:50 -0400 Subject: Apply clippy restrictions --- src/poisonable.rs | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'src/poisonable.rs') 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); }); -- cgit v1.2.3