From 94795fe0f07b1cf1480db5a295076486424e10c5 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 19 Jul 2024 18:30:05 +0700 Subject: [PATCH] Suppress `dead_code` warnings on some platforms. Not all platforms use the `BoundSender` and `bounded` and on those, building results in `dead_code` warnings. --- notify/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notify/src/lib.rs b/notify/src/lib.rs index e7e8f909..010f0213 100644 --- a/notify/src/lib.rs +++ b/notify/src/lib.rs @@ -170,6 +170,7 @@ use std::path::Path; pub(crate) type Receiver = std::sync::mpsc::Receiver; pub(crate) type Sender = std::sync::mpsc::Sender; +#[allow(dead_code)] // This is not used on all platforms. pub(crate) type BoundSender = std::sync::mpsc::SyncSender; #[inline] @@ -177,6 +178,7 @@ pub(crate) fn unbounded() -> (Sender, Receiver) { std::sync::mpsc::channel() } +#[allow(dead_code)] // This is not used on all platforms. #[inline] pub(crate) fn bounded(cap: usize) -> (BoundSender, Receiver) { std::sync::mpsc::sync_channel(cap)