Skip to content

Commit

Permalink
bindings/rust: mask "false positive" clippy nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Oct 26, 2023
1 parent 748745e commit 49f8474
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bindings/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ impl Pairing {
}
}

#[allow(clippy::too_many_arguments)]
pub fn mul_n_aggregate(
&mut self,
pk: &dyn Any,
Expand Down Expand Up @@ -1208,6 +1209,7 @@ macro_rules! sig_variant_impl {

// https://ethresear.ch/t/fast-verification-of-multiple-bls-signatures/5407
#[cfg(feature = "std")]
#[allow(clippy::too_many_arguments)]
pub fn verify_multiple_aggregate_signatures(
msgs: &[&[u8]],
dst: &[u8],
Expand Down
2 changes: 2 additions & 0 deletions bindings/rust/src/pippenger-no_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ macro_rules! pippenger_mult_impl {
let mut ret = Self {
points: Vec::with_capacity(npoints),
};
#[allow(clippy::uninit_vec)]
unsafe { ret.points.set_len(npoints) };

let p: [*const $point; 2] = [&points[0], ptr::null()];
Expand All @@ -74,6 +75,7 @@ macro_rules! pippenger_mult_impl {
unsafe {
let mut scratch: Vec<u64> =
Vec::with_capacity($scratch_sizeof(npoints) / 8);
#[allow(clippy::uninit_vec)]
scratch.set_len(scratch.capacity());
$multi_scalar_mult(
&mut ret,
Expand Down
2 changes: 2 additions & 0 deletions bindings/rust/src/pippenger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ macro_rules! pippenger_mult_impl {
unsafe {
let mut scratch: Vec<u64> =
Vec::with_capacity($scratch_sizeof(npoints) / 8);
#[allow(clippy::uninit_vec)]
scratch.set_len(scratch.capacity());
let mut ret = <$point>::default();
$multi_scalar_mult(
Expand All @@ -151,6 +152,7 @@ macro_rules! pippenger_mult_impl {
// |grid[]| holds "coordinates" and place for result
let mut grid: Vec<(tile, Cell<$point>)> =
Vec::with_capacity(nx * ny);
#[allow(clippy::uninit_vec)]
unsafe { grid.set_len(grid.capacity()) };
let dx = npoints / nx;
let mut y = window * (ny - 1);
Expand Down

0 comments on commit 49f8474

Please sign in to comment.