diff --git a/build.rs b/build.rs index 4bf21fe81..522e223b9 100644 --- a/build.rs +++ b/build.rs @@ -1,5 +1,3 @@ -println!("cargo::rustc-check-cfg=cfg(nightly)"); - fn is_compiled_for_64_bit_arch() -> bool { cfg!(target_pointer_width = "64") } diff --git a/fr32/src/padding.rs b/fr32/src/padding.rs index 8cc7c546f..adfd82962 100644 --- a/fr32/src/padding.rs +++ b/fr32/src/padding.rs @@ -563,15 +563,14 @@ need to handle the potential bit-level misalignments: // offset and num_bytes are based on the unpadded data, so // if [0, 1, ..., 255] was the original unpadded data, offset 3 and len 4 would return // [3, 4, 5, 6]. -#[allow(clippy::multiple_bound_locations)] -pub fn write_unpadded( +pub fn write_unpadded( source: &[u8], target: &mut W, offset: usize, len: usize, ) -> io::Result where - W: Write, + W: Write + Sized, { // Check that there's actually `len` raw data bytes encoded inside // `source` starting at `offset`. @@ -631,8 +630,7 @@ The reader will generally operate with bit precision, even if the padded layout is byte-aligned (no extra bits) the data inside it isn't (since we pad at the bit-level). **/ -#[allow(clippy::multiple_bound_locations)] -fn write_unpadded_aux( +fn write_unpadded_aux( padding_map: &PaddingMap, source: &[u8], target: &mut W, @@ -640,7 +638,7 @@ fn write_unpadded_aux( max_write_size: usize, ) -> io::Result where - W: Write, + W: Write + Sized, { // Position of the reader in the padded bit stream layout, deduced from // the position of the writer (`write_pos`) in the raw data layout. diff --git a/storage-proofs-core/src/gadgets/insertion.rs b/storage-proofs-core/src/gadgets/insertion.rs index 61b75e691..f4b8837cb 100644 --- a/storage-proofs-core/src/gadgets/insertion.rs +++ b/storage-proofs-core/src/gadgets/insertion.rs @@ -316,16 +316,12 @@ pub fn select>( } /// Takes two allocated numbers (`a`, `b`) and returns `a` if the condition is true, and `b` otherwise. -#[allow(clippy::multiple_bound_locations)] pub fn pick>( mut cs: CS, condition: &Boolean, a: &AllocatedNum, b: &AllocatedNum, -) -> Result, SynthesisError> -where - CS: ConstraintSystem, -{ +) -> Result, SynthesisError> { let c = AllocatedNum::alloc(cs.namespace(|| "pick result"), || { if condition .get_value() diff --git a/storage-proofs-porep/build.rs b/storage-proofs-porep/build.rs index a31ccf97c..f6172d315 100644 --- a/storage-proofs-porep/build.rs +++ b/storage-proofs-porep/build.rs @@ -1,4 +1,5 @@ fn main() { + println!("cargo::rustc-check-cfg=cfg(nightly)"); cfg_if_nightly() } @@ -8,6 +9,4 @@ fn cfg_if_nightly() { } #[rustversion::not(nightly)] -fn cfg_if_nightly() { - println!("cargo::rustc-check-cfg=cfg(nightly)"); -} +fn cfg_if_nightly() {}