Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hanabi1224 upgrade deps #1770

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
println!("cargo::rustc-check-cfg=cfg(nightly)");

fn is_compiled_for_64_bit_arch() -> bool {
cfg!(target_pointer_width = "64")
}
Expand Down
10 changes: 4 additions & 6 deletions fr32/src/padding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<W: ?Sized>(
pub fn write_unpadded<W>(
source: &[u8],
target: &mut W,
offset: usize,
len: usize,
) -> io::Result<usize>
where
W: Write,
W: Write + Sized,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
W: Write + Sized,
W: Write + ?Sized,

{
// Check that there's actually `len` raw data bytes encoded inside
// `source` starting at `offset`.
Expand Down Expand Up @@ -631,16 +630,15 @@ 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<W: ?Sized>(
fn write_unpadded_aux<W>(
padding_map: &PaddingMap,
source: &[u8],
target: &mut W,
write_pos: usize,
max_write_size: usize,
) -> io::Result<usize>
where
W: Write,
W: Write + Sized,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
W: Write + Sized,
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.
Expand Down
6 changes: 1 addition & 5 deletions storage-proofs-core/src/gadgets/insertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,12 @@ pub fn select<Scalar: PrimeField, CS: ConstraintSystem<Scalar>>(
}

/// 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<Scalar: PrimeField, CS: ConstraintSystem<Scalar>>(
mut cs: CS,
condition: &Boolean,
a: &AllocatedNum<Scalar>,
b: &AllocatedNum<Scalar>,
) -> Result<AllocatedNum<Scalar>, SynthesisError>
where
CS: ConstraintSystem<Scalar>,
{
) -> Result<AllocatedNum<Scalar>, SynthesisError> {
let c = AllocatedNum::alloc(cs.namespace(|| "pick result"), || {
if condition
.get_value()
Expand Down
5 changes: 2 additions & 3 deletions storage-proofs-porep/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
fn main() {
println!("cargo::rustc-check-cfg=cfg(nightly)");
cfg_if_nightly()
}

Expand All @@ -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() {}
Loading