Skip to content

Commit

Permalink
feat: update rust-toolchain to 1.62.0 (#1623)
Browse files Browse the repository at this point in the history
* feat: update rust-toolchain to 1.62.0

* Bump toolchain to 1.62.1

Use the most recent stable release.

Co-authored-by: Volker Mische <volker.mische@gmail.com>
  • Loading branch information
cryptonemo and vmx committed Aug 5, 2022
1 parent 1085172 commit 380d643
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion fil-proofs-param/src/bin/parampublish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fn is_well_formed_filename(filename: &str) -> bool {
return false;
}
let version_is_valid =
version.get(0..1).unwrap() == "v" && version[1..].chars().all(|c| c.is_digit(10));
version.get(0..1).unwrap() == "v" && version[1..].chars().all(|c| c.is_ascii_digit());
if !version_is_valid {
warn!(
"filename does not start with version: {}, ignoring file",
Expand Down
2 changes: 1 addition & 1 deletion fil-proofs-param/src/bin/srspublish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn is_well_formed_filename(filename: &str) -> bool {
return false;
}
let version_is_valid =
version.get(0..1).unwrap() == "v" && version[1..].chars().all(|c| c.is_digit(10));
version.get(0..1).unwrap() == "v" && version[1..].chars().all(|c| c.is_ascii_digit());
if !version_is_valid {
warn!(
"filename does not start with version: {}, ignoring file",
Expand Down
6 changes: 3 additions & 3 deletions fil-proofs-tooling/src/bin/micro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,23 +224,23 @@ fn parse_criterion_out(s: impl AsRef<str>) -> Vec<CriterionResult> {

/// parses a string of the form "521.80 KiB/s".
fn throughput_to_uom(s: &str) -> String {
let parts = s.trim().split_whitespace().collect::<Vec<_>>();
let parts = s.split_whitespace().collect::<Vec<_>>();
assert_eq!(parts.len(), 2, "invalid val: {:?}", parts);
let _: f64 = parts[0].parse().expect("invalid number");
parts[1].to_string()
}

/// parses a string of the form "521.80 KiB/s".
fn throughput_val(s: &str) -> f64 {
let parts = s.trim().split_whitespace().collect::<Vec<_>>();
let parts = s.split_whitespace().collect::<Vec<_>>();
assert_eq!(parts.len(), 2, "invalid val: {:?}", parts);
let ts: f64 = parts[0].parse().expect("invalid number");
ts
}

/// parses a string of the form "123.12 us".
fn time_to_us(s: &str) -> f64 {
let parts = s.trim().split_whitespace().collect::<Vec<_>>();
let parts = s.split_whitespace().collect::<Vec<_>>();
assert_eq!(parts.len(), 2, "invalid val: {:?}", parts);
let ts: f64 = parts[0].parse().expect("invalid number");
let normalized = match parts[1] {
Expand Down
2 changes: 1 addition & 1 deletion filecoin-hashers/src/sha256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ impl HashFunction<Sha256Domain> for Sha256Function {
let le_bits = be_bits
.chunks(8)
.flat_map(|chunk| chunk.iter().rev())
.cloned()
.take(Fr::CAPACITY as usize)
.cloned()
.collect::<Vec<_>>();
multipack::pack_bits(cs.namespace(|| "pack_le"), &le_bits)
}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.59.0
1.62.1
4 changes: 2 additions & 2 deletions storage-proofs-core/src/gadgets/por.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl<'a, Tree: 'static + MerkleTreeTrait> CompoundProof<'a, PoR<Tree>, PoRCircui
}
}

impl<'a, Tree: MerkleTreeTrait> Circuit<Fr> for PoRCircuit<Tree> {
impl<Tree: MerkleTreeTrait> Circuit<Fr> for PoRCircuit<Tree> {
/// # Public Inputs
///
/// This circuit expects the following public inputs.
Expand Down Expand Up @@ -418,7 +418,7 @@ impl<'a, Tree: MerkleTreeTrait> Circuit<Fr> for PoRCircuit<Tree> {
}
}

impl<'a, Tree: MerkleTreeTrait> PoRCircuit<Tree> {
impl<Tree: MerkleTreeTrait> PoRCircuit<Tree> {
pub fn new(proof: Tree::Proof, private: bool) -> Self {
PoRCircuit::<Tree> {
value: Root::Val(Some(proof.leaf().into())),
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-porep/src/stacked/vanilla/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ where
}
}

impl<'a, H, G> StackedGraph<H, G>
impl<H, G> StackedGraph<H, G>
where
H: Hasher,
G: Graph<H> + ParameterSetMetadata + Sync + Send,
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-porep/src/stacked/vanilla/porep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
PoRep,
};

impl<'a, 'c, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> PoRep<'a, Tree::Hasher, G>
impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> PoRep<'a, Tree::Hasher, G>
for StackedDrg<'a, Tree, G>
{
type Tau = Tau<<Tree::Hasher as Hasher>::Domain, <G as Hasher>::Domain>;
Expand Down
4 changes: 2 additions & 2 deletions storage-proofs-post/src/election/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ pub struct ElectionPoStCircuit<Tree: MerkleTreeTrait> {
#[derive(Clone, Default)]
pub struct ComponentPrivateInputs {}

impl<'a, Tree: MerkleTreeTrait> CircuitComponent for ElectionPoStCircuit<Tree> {
impl<Tree: MerkleTreeTrait> CircuitComponent for ElectionPoStCircuit<Tree> {
type ComponentPrivateInputs = ComponentPrivateInputs;
}

impl<'a, Tree: 'static + MerkleTreeTrait> Circuit<Fr> for ElectionPoStCircuit<Tree> {
impl<Tree: 'static + MerkleTreeTrait> Circuit<Fr> for ElectionPoStCircuit<Tree> {
fn synthesize<CS: ConstraintSystem<Fr>>(self, cs: &mut CS) -> Result<(), SynthesisError> {
let comm_r = self.comm_r;
let comm_c = self.comm_c;
Expand Down
4 changes: 2 additions & 2 deletions storage-proofs-post/src/rational/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ pub struct RationalPoStCircuit<Tree: MerkleTreeTrait> {
#[derive(Clone, Default)]
pub struct ComponentPrivateInputs {}

impl<'a, Tree: MerkleTreeTrait> CircuitComponent for RationalPoStCircuit<Tree> {
impl<Tree: MerkleTreeTrait> CircuitComponent for RationalPoStCircuit<Tree> {
type ComponentPrivateInputs = ComponentPrivateInputs;
}

impl<'a, Tree: 'static + MerkleTreeTrait> Circuit<Fr> for RationalPoStCircuit<Tree> {
impl<Tree: 'static + MerkleTreeTrait> Circuit<Fr> for RationalPoStCircuit<Tree> {
fn synthesize<CS: ConstraintSystem<Fr>>(self, cs: &mut CS) -> Result<(), SynthesisError> {
let comm_rs = self.comm_rs;
let comm_cs = self.comm_cs;
Expand Down
2 changes: 1 addition & 1 deletion storage-proofs-post/src/rational/compound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ where
}
}

impl<'a, Tree: 'static + MerkleTreeTrait> RationalPoStCircuit<Tree> {
impl<Tree: 'static + MerkleTreeTrait> RationalPoStCircuit<Tree> {
#[allow(clippy::type_complexity)]
pub fn synthesize<CS: ConstraintSystem<Fr>>(
cs: &mut CS,
Expand Down

0 comments on commit 380d643

Please sign in to comment.