From b9af71e0912b2b570d5b0f5f65d3396a15e5b40b Mon Sep 17 00:00:00 2001 From: Arash Sahebolamri Date: Fri, 12 Jul 2024 09:20:57 -0700 Subject: [PATCH] Silence warnings --- ipc-queue/src/fifo.rs | 2 ++ ipc-queue/src/lib.rs | 3 +++ ipc-queue/src/position.rs | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/ipc-queue/src/fifo.rs b/ipc-queue/src/fifo.rs index 847904ac..7541ef4b 100644 --- a/ipc-queue/src/fifo.rs +++ b/ipc-queue/src/fifo.rs @@ -356,10 +356,12 @@ impl Offsets { } } + #[allow(unused)] pub(crate) fn read_high_bit(&self) -> bool { self.read & self.len == self.len } + #[allow(unused)] pub(crate) fn write_high_bit(&self) -> bool { self.write & self.len == self.len } diff --git a/ipc-queue/src/lib.rs b/ipc-queue/src/lib.rs index 279b7800..53fca1e9 100644 --- a/ipc-queue/src/lib.rs +++ b/ipc-queue/src/lib.rs @@ -146,11 +146,13 @@ pub trait AsyncSynchronizer: Clone { fn notify(&self, event: QueueEvent); } +#[allow(dead_code)] pub struct AsyncSender { inner: Fifo, synchronizer: S, } +#[allow(dead_code)] pub struct AsyncReceiver { inner: Fifo, synchronizer: S, @@ -159,6 +161,7 @@ pub struct AsyncReceiver { /// `DescriptorGuard` can produce a `FifoDescriptor` that is guaranteed /// to remain valid as long as the DescriptorGuard is not dropped. +#[allow(dead_code)] pub struct DescriptorGuard { descriptor: FifoDescriptor, #[cfg(not(target_env = "sgx"))] diff --git a/ipc-queue/src/position.rs b/ipc-queue/src/position.rs index a986ed1b..9f28f812 100644 --- a/ipc-queue/src/position.rs +++ b/ipc-queue/src/position.rs @@ -19,18 +19,22 @@ use std::sync::atomic::Ordering; /// arranged as a ring buffer, we can assign a position to each value written/ /// read to/from the queue. This is useful in case we want to know whether or /// not a particular value written to the queue has been read. +#[allow(dead_code)] pub struct PositionMonitor { read_epoch: Arc, fifo: Fifo, } /// A read position in a queue. +#[allow(dead_code)] pub struct ReadPosition(u64); /// A write position in a queue. +#[allow(dead_code)] pub struct WritePosition(u64); impl PositionMonitor { + #[allow(dead_code)] pub (crate) fn new(read_epoch: Arc,fifo: Fifo) -> PositionMonitor { PositionMonitor { read_epoch,