diff --git a/src/helpers/gateway/stall_detection.rs b/src/helpers/gateway/stall_detection.rs index 236b09700..c2e288572 100644 --- a/src/helpers/gateway/stall_detection.rs +++ b/src/helpers/gateway/stall_detection.rs @@ -67,9 +67,10 @@ impl Observed { } mod gateway { + use delegate::delegate; - use super::*; + use super::{receive, send, AtomicUsize, Debug, Formatter, ObserveState, Observed, Weak}; use crate::{ helpers::{ gateway::{Gateway, State}, @@ -126,7 +127,7 @@ mod gateway { let mut last_sn_seen = 0; loop { ::tokio::time::sleep(config.progress_check_interval).await; - let now = gateway.get_sn().upgrade().map(|v| v.load(Ordering::Relaxed)); + let now = gateway.get_sn().upgrade().map(|v| v.load(core::sync::atomic::Ordering::Relaxed)); if let Some(now) = now { if now == last_sn_seen { if let Some(state) = gateway.get_state() { @@ -215,7 +216,7 @@ mod receive { fmt::{Debug, Formatter}, }; - use super::*; + use super::{ObserveState, Observed}; use crate::{ helpers::{ error::Error, @@ -273,7 +274,7 @@ mod send { fmt::{Debug, Formatter}, }; - use super::*; + use super::{ObserveState, Observed}; use crate::{ helpers::{ error::Error, diff --git a/src/protocol/ipa_prf/boolean_ops/addition_sequential.rs b/src/protocol/ipa_prf/boolean_ops/addition_sequential.rs index 1b50e95b3..71f571f5d 100644 --- a/src/protocol/ipa_prf/boolean_ops/addition_sequential.rs +++ b/src/protocol/ipa_prf/boolean_ops/addition_sequential.rs @@ -1,16 +1,10 @@ #[cfg(all(test, unit_test))] use ipa_macros::Step; -#[cfg(all(test, unit_test))] use crate::{ error::Error, ff::{ArrayAccess, CustomArray, Field}, - protocol::{ - basics::{if_else, SecureMul}, - context::Context, - step::BitOpStep, - RecordId, - }, + protocol::{basics::SecureMul, context::Context, step::BitOpStep, RecordId}, secret_sharing::{replicated::semi_honest::AdditiveShare, WeakSharedValue}, }; @@ -25,7 +19,7 @@ pub(crate) enum Step { /// adds y to x, Output has same length as x (carries and indices of y too large for x are ignored) /// # Errors /// propagates errors from multiply -#[cfg(all(test, unit_test))] +#[allow(dead_code)] pub async fn integer_add( ctx: C, record_id: RecordId, @@ -61,7 +55,7 @@ where S: CustomArray + Field, S::Element: Field, { - use crate::ff::Expand; + use crate::{ff::Expand, protocol::basics::if_else}; let mut carry = AdditiveShare::::ZERO; let result = addition_circuit( ctx.narrow(&Step::SaturatedAddition), @@ -92,7 +86,7 @@ where /// for all i: output[i] = x[i] + (c[i-1] + y[i]) /// # Errors /// propagates errors from multiply -#[cfg(all(test, unit_test))] +#[allow(dead_code)] async fn addition_circuit( ctx: C, record_id: RecordId, @@ -131,7 +125,6 @@ where /// update carry to carry = ( x + carry)(y + carry) + carry /// # Errors /// propagates errors from multiply -#[cfg(all(test, unit_test))] async fn bit_adder( ctx: C, record_id: RecordId, diff --git a/src/protocol/ipa_prf/boolean_ops/share_conversion_aby.rs b/src/protocol/ipa_prf/boolean_ops/share_conversion_aby.rs index d17825210..3ce7cd833 100644 --- a/src/protocol/ipa_prf/boolean_ops/share_conversion_aby.rs +++ b/src/protocol/ipa_prf/boolean_ops/share_conversion_aby.rs @@ -1,10 +1,7 @@ -#[cfg(all(test, unit_test))] use std::ops::Neg; -#[cfg(all(test, unit_test))] use ipa_macros::Step; -#[cfg(all(test, unit_test))] use crate::{ error::Error, ff::{ @@ -22,7 +19,6 @@ use crate::{ }, }; -#[cfg(all(test, unit_test))] #[derive(Step)] pub(crate) enum Step { GenerateSecretSharing, @@ -96,7 +92,7 @@ pub(crate) enum Step { /// /// # Errors /// Propagates Errors from Integer Subtraction and Partial Reveal -#[cfg(all(test, unit_test))] +#[allow(dead_code)] async fn convert_to_fp25519( ctx: C, record_id: RecordId, diff --git a/src/protocol/sort/mod.rs b/src/protocol/sort/mod.rs index c285af1b6..bdbfb8907 100644 --- a/src/protocol/sort/mod.rs +++ b/src/protocol/sort/mod.rs @@ -29,7 +29,7 @@ pub(crate) enum SortStep { } #[derive(Step, Clone, Copy)] -pub(crate) enum ShuffleStep { +pub enum ShuffleStep { Shuffle1, Shuffle2, Shuffle3,