From bd90c532e77494376d34c3dafad231e6771bcd85 Mon Sep 17 00:00:00 2001 From: Judson Lester Date: Mon, 16 Sep 2024 12:20:56 -0700 Subject: [PATCH] fix: allow dead_code for MutexGuard --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index ee6bd3e..fc279e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -278,6 +278,8 @@ mod tests { use tokio::sync::{Mutex, MutexGuard}; use tokio::task; + // field 0 is never read, but its drop is important + #[allow(dead_code)] struct TestGuard(MutexGuard<'static, ()>, T); impl Deref for TestGuard {