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 61ff14a commit d402d53
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, hash_column};

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 @@ -13,7 +13,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_std::{marker::PhantomData, rand::RngCore},
Expand Down Expand Up @@ -182,11 +182,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 @@ -204,17 +203,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 d402d53

Please sign in to comment.