Skip to content

Commit bc46f8a

Browse files
authored
chore(l1, l2): fix warning in ethrex-crypto when no feature is included (#5144)
**Motivation** There were compilation warnings while compiling ethrex-crypto with no features. **Description** <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 --> Closes #issue_number
1 parent ba7b5d9 commit bc46f8a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/common/crypto/kzg.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::iter::repeat_n;
2-
31
// TODO: Currently, we cannot include the types crate independently of common because the crates are not yet split.
42
// After issue #4596 ("Split types crate from common") is resolved, update this to import the types crate directly,
53
// so that crypto/kzg.rs does not depend on common for type definitions.
@@ -56,6 +54,7 @@ impl From<kzg_rs::KzgError> for KzgError {
5654

5755
/// Verifies a KZG proof for blob committed data, using a Fiat-Shamir protocol
5856
/// as defined by EIP-7594.
57+
#[allow(unused_variables)]
5958
pub fn verify_cell_kzg_proof_batch(
6059
blobs: &[Blob],
6160
commitments: &[Commitment],
@@ -76,9 +75,11 @@ pub fn verify_cell_kzg_proof_batch(
7675
c_kzg_settings,
7776
&commitments
7877
.iter()
79-
.flat_map(|commitment| repeat_n((*commitment).into(), CELLS_PER_EXT_BLOB))
78+
.flat_map(|commitment| {
79+
std::iter::repeat_n((*commitment).into(), CELLS_PER_EXT_BLOB)
80+
})
8081
.collect::<Vec<_>>(),
81-
&repeat_n(0..CELLS_PER_EXT_BLOB as u64, blobs.len())
82+
&std::iter::repeat_n(0..CELLS_PER_EXT_BLOB as u64, blobs.len())
8283
.flatten()
8384
.collect::<Vec<_>>(),
8485
&cells,

0 commit comments

Comments
 (0)