Skip to content

Commit

Permalink
Silence warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Arash Sahebolamri committed Jul 12, 2024
1 parent 7ab5eec commit b9af71e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ipc-queue/src/fifo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 3 additions & 0 deletions ipc-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ pub trait AsyncSynchronizer: Clone {
fn notify(&self, event: QueueEvent);
}

#[allow(dead_code)]
pub struct AsyncSender<T: 'static, S> {
inner: Fifo<T>,
synchronizer: S,
}

#[allow(dead_code)]
pub struct AsyncReceiver<T: 'static, S> {
inner: Fifo<T>,
synchronizer: S,
Expand All @@ -159,6 +161,7 @@ pub struct AsyncReceiver<T: 'static, S> {

/// `DescriptorGuard<T>` can produce a `FifoDescriptor<T>` that is guaranteed
/// to remain valid as long as the DescriptorGuard is not dropped.
#[allow(dead_code)]
pub struct DescriptorGuard<T> {
descriptor: FifoDescriptor<T>,
#[cfg(not(target_env = "sgx"))]
Expand Down
4 changes: 4 additions & 0 deletions ipc-queue/src/position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: 'static> {
read_epoch: Arc<AtomicU64>,
fifo: Fifo<T>,
}

/// 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<T> PositionMonitor<T> {
#[allow(dead_code)]
pub (crate) fn new(read_epoch: Arc<AtomicU64>,fifo: Fifo<T>) -> PositionMonitor<T> {
PositionMonitor {
read_epoch,
Expand Down

0 comments on commit b9af71e

Please sign in to comment.