Skip to content

Commit

Permalink
remove cfg(benches) attributes as that feature is no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagician committed Nov 14, 2023
1 parent 890b4b1 commit b00defd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 0 additions & 2 deletions poly-commit/src/linear_codes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ mod data_structures;
use data_structures::*;

pub use data_structures::LinCodePCProof;
#[cfg(any(feature = "benches", test))]
pub use utils::{FieldToBytesColHasher, LeafIdentityHasher};

use utils::{calculate_t, get_indices_from_transcript};

Expand Down
16 changes: 7 additions & 9 deletions poly-commit/src/linear_codes/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use ark_std::vec::Vec;
#[cfg(not(feature = "std"))]
use num_traits::Float;

#[cfg(any(feature = "benches", test))]
#[cfg(test)]
use {
crate::to_bytes,
ark_crypto_primitives::crh::CRHScheme,
Expand Down Expand Up @@ -163,11 +163,10 @@ pub(crate) fn calculate_t<F: PrimeField>(
Ok(if t < codeword_len { t } else { codeword_len })
}

/// Only needed for benches and tests.
#[cfg(any(feature = "benches", test))]
pub struct LeafIdentityHasher;
#[cfg(test)]
pub(crate) struct LeafIdentityHasher;

#[cfg(any(feature = "benches", test))]
#[cfg(test)]
impl CRHScheme for LeafIdentityHasher {
type Input = Vec<u8>;
type Output = Vec<u8>;
Expand All @@ -185,17 +184,16 @@ impl CRHScheme for LeafIdentityHasher {
}
}

/// Only needed for benches and tests.
#[cfg(any(feature = "benches", test))]
pub struct FieldToBytesColHasher<F, D>
#[cfg(test)]
pub(crate) struct FieldToBytesColHasher<F, D>
where
F: PrimeField + CanonicalSerialize,
D: Digest,
{
_phantom: PhantomData<(F, D)>,
}

#[cfg(any(feature = "benches", test))]
#[cfg(test)]
impl<F, D> CRHScheme for FieldToBytesColHasher<F, D>
where
F: PrimeField + CanonicalSerialize,
Expand Down

0 comments on commit b00defd

Please sign in to comment.