Skip to content

Commit f662f9b

Browse files
committed
fix: apply review feedback
1 parent a616f90 commit f662f9b

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

build.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
println!("cargo::rustc-check-cfg=cfg(nightly)");
2-
31
fn is_compiled_for_64_bit_arch() -> bool {
42
cfg!(target_pointer_width = "64")
53
}

fr32/src/padding.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -563,15 +563,14 @@ need to handle the potential bit-level misalignments:
563563
// offset and num_bytes are based on the unpadded data, so
564564
// if [0, 1, ..., 255] was the original unpadded data, offset 3 and len 4 would return
565565
// [3, 4, 5, 6].
566-
#[allow(clippy::multiple_bound_locations)]
567-
pub fn write_unpadded<W: ?Sized>(
566+
pub fn write_unpadded<W>(
568567
source: &[u8],
569568
target: &mut W,
570569
offset: usize,
571570
len: usize,
572571
) -> io::Result<usize>
573572
where
574-
W: Write,
573+
W: Write + Sized,
575574
{
576575
// Check that there's actually `len` raw data bytes encoded inside
577576
// `source` starting at `offset`.
@@ -631,16 +630,15 @@ The reader will generally operate with bit precision, even if the padded
631630
layout is byte-aligned (no extra bits) the data inside it isn't (since
632631
we pad at the bit-level).
633632
**/
634-
#[allow(clippy::multiple_bound_locations)]
635-
fn write_unpadded_aux<W: ?Sized>(
633+
fn write_unpadded_aux<W>(
636634
padding_map: &PaddingMap,
637635
source: &[u8],
638636
target: &mut W,
639637
write_pos: usize,
640638
max_write_size: usize,
641639
) -> io::Result<usize>
642640
where
643-
W: Write,
641+
W: Write + Sized,
644642
{
645643
// Position of the reader in the padded bit stream layout, deduced from
646644
// the position of the writer (`write_pos`) in the raw data layout.

storage-proofs-core/src/gadgets/insertion.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,12 @@ pub fn select<Scalar: PrimeField, CS: ConstraintSystem<Scalar>>(
316316
}
317317

318318
/// Takes two allocated numbers (`a`, `b`) and returns `a` if the condition is true, and `b` otherwise.
319-
#[allow(clippy::multiple_bound_locations)]
320319
pub fn pick<Scalar: PrimeField, CS: ConstraintSystem<Scalar>>(
321320
mut cs: CS,
322321
condition: &Boolean,
323322
a: &AllocatedNum<Scalar>,
324323
b: &AllocatedNum<Scalar>,
325-
) -> Result<AllocatedNum<Scalar>, SynthesisError>
326-
where
327-
CS: ConstraintSystem<Scalar>,
328-
{
324+
) -> Result<AllocatedNum<Scalar>, SynthesisError> {
329325
let c = AllocatedNum::alloc(cs.namespace(|| "pick result"), || {
330326
if condition
331327
.get_value()

storage-proofs-porep/build.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
fn main() {
2+
println!("cargo::rustc-check-cfg=cfg(nightly)");
23
cfg_if_nightly()
34
}
45

@@ -8,6 +9,4 @@ fn cfg_if_nightly() {
89
}
910

1011
#[rustversion::not(nightly)]
11-
fn cfg_if_nightly() {
12-
println!("cargo::rustc-check-cfg=cfg(nightly)");
13-
}
12+
fn cfg_if_nightly() {}

0 commit comments

Comments
 (0)