diff --git a/fil-proofs-param/src/bin/parampublish.rs b/fil-proofs-param/src/bin/parampublish.rs index 7c9a9658b..f53347499 100644 --- a/fil-proofs-param/src/bin/parampublish.rs +++ b/fil-proofs-param/src/bin/parampublish.rs @@ -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", diff --git a/fil-proofs-param/src/bin/srspublish.rs b/fil-proofs-param/src/bin/srspublish.rs index 91fc80325..cc7138fa4 100644 --- a/fil-proofs-param/src/bin/srspublish.rs +++ b/fil-proofs-param/src/bin/srspublish.rs @@ -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", diff --git a/fil-proofs-tooling/src/bin/micro.rs b/fil-proofs-tooling/src/bin/micro.rs index cfebb1e27..51e4291dc 100644 --- a/fil-proofs-tooling/src/bin/micro.rs +++ b/fil-proofs-tooling/src/bin/micro.rs @@ -224,7 +224,7 @@ fn parse_criterion_out(s: impl AsRef) -> Vec { /// parses a string of the form "521.80 KiB/s". fn throughput_to_uom(s: &str) -> String { - let parts = s.trim().split_whitespace().collect::>(); + let parts = s.split_whitespace().collect::>(); assert_eq!(parts.len(), 2, "invalid val: {:?}", parts); let _: f64 = parts[0].parse().expect("invalid number"); parts[1].to_string() @@ -232,7 +232,7 @@ fn throughput_to_uom(s: &str) -> String { /// parses a string of the form "521.80 KiB/s". fn throughput_val(s: &str) -> f64 { - let parts = s.trim().split_whitespace().collect::>(); + let parts = s.split_whitespace().collect::>(); assert_eq!(parts.len(), 2, "invalid val: {:?}", parts); let ts: f64 = parts[0].parse().expect("invalid number"); ts @@ -240,7 +240,7 @@ fn throughput_val(s: &str) -> f64 { /// parses a string of the form "123.12 us". fn time_to_us(s: &str) -> f64 { - let parts = s.trim().split_whitespace().collect::>(); + let parts = s.split_whitespace().collect::>(); assert_eq!(parts.len(), 2, "invalid val: {:?}", parts); let ts: f64 = parts[0].parse().expect("invalid number"); let normalized = match parts[1] { diff --git a/filecoin-hashers/src/sha256.rs b/filecoin-hashers/src/sha256.rs index 525af029f..39f839d54 100644 --- a/filecoin-hashers/src/sha256.rs +++ b/filecoin-hashers/src/sha256.rs @@ -223,8 +223,8 @@ impl HashFunction for Sha256Function { let le_bits = be_bits .chunks(8) .flat_map(|chunk| chunk.iter().rev()) - .cloned() .take(Fr::CAPACITY as usize) + .cloned() .collect::>(); multipack::pack_bits(cs.namespace(|| "pack_le"), &le_bits) } diff --git a/rust-toolchain b/rust-toolchain index bb120e876..b77a81dcb 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.59.0 +1.62.1 diff --git a/storage-proofs-core/src/gadgets/por.rs b/storage-proofs-core/src/gadgets/por.rs index 5294e36d6..84e5182ab 100644 --- a/storage-proofs-core/src/gadgets/por.rs +++ b/storage-proofs-core/src/gadgets/por.rs @@ -336,7 +336,7 @@ impl<'a, Tree: 'static + MerkleTreeTrait> CompoundProof<'a, PoR, PoRCircui } } -impl<'a, Tree: MerkleTreeTrait> Circuit for PoRCircuit { +impl Circuit for PoRCircuit { /// # Public Inputs /// /// This circuit expects the following public inputs. @@ -418,7 +418,7 @@ impl<'a, Tree: MerkleTreeTrait> Circuit for PoRCircuit { } } -impl<'a, Tree: MerkleTreeTrait> PoRCircuit { +impl PoRCircuit { pub fn new(proof: Tree::Proof, private: bool) -> Self { PoRCircuit:: { value: Root::Val(Some(proof.leaf().into())), diff --git a/storage-proofs-porep/src/stacked/vanilla/graph.rs b/storage-proofs-porep/src/stacked/vanilla/graph.rs index f57dec79e..50d560c13 100644 --- a/storage-proofs-porep/src/stacked/vanilla/graph.rs +++ b/storage-proofs-porep/src/stacked/vanilla/graph.rs @@ -331,7 +331,7 @@ where } } -impl<'a, H, G> StackedGraph +impl StackedGraph where H: Hasher, G: Graph + ParameterSetMetadata + Sync + Send, diff --git a/storage-proofs-porep/src/stacked/vanilla/porep.rs b/storage-proofs-porep/src/stacked/vanilla/porep.rs index 38e9600c6..f3d9cac2c 100644 --- a/storage-proofs-porep/src/stacked/vanilla/porep.rs +++ b/storage-proofs-porep/src/stacked/vanilla/porep.rs @@ -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<::Domain, ::Domain>; diff --git a/storage-proofs-post/src/election/circuit.rs b/storage-proofs-post/src/election/circuit.rs index ae37ee39b..280ecc60d 100644 --- a/storage-proofs-post/src/election/circuit.rs +++ b/storage-proofs-post/src/election/circuit.rs @@ -29,11 +29,11 @@ pub struct ElectionPoStCircuit { #[derive(Clone, Default)] pub struct ComponentPrivateInputs {} -impl<'a, Tree: MerkleTreeTrait> CircuitComponent for ElectionPoStCircuit { +impl CircuitComponent for ElectionPoStCircuit { type ComponentPrivateInputs = ComponentPrivateInputs; } -impl<'a, Tree: 'static + MerkleTreeTrait> Circuit for ElectionPoStCircuit { +impl Circuit for ElectionPoStCircuit { fn synthesize>(self, cs: &mut CS) -> Result<(), SynthesisError> { let comm_r = self.comm_r; let comm_c = self.comm_c; diff --git a/storage-proofs-post/src/rational/circuit.rs b/storage-proofs-post/src/rational/circuit.rs index 14fbead05..e363fa513 100644 --- a/storage-proofs-post/src/rational/circuit.rs +++ b/storage-proofs-post/src/rational/circuit.rs @@ -23,11 +23,11 @@ pub struct RationalPoStCircuit { #[derive(Clone, Default)] pub struct ComponentPrivateInputs {} -impl<'a, Tree: MerkleTreeTrait> CircuitComponent for RationalPoStCircuit { +impl CircuitComponent for RationalPoStCircuit { type ComponentPrivateInputs = ComponentPrivateInputs; } -impl<'a, Tree: 'static + MerkleTreeTrait> Circuit for RationalPoStCircuit { +impl Circuit for RationalPoStCircuit { fn synthesize>(self, cs: &mut CS) -> Result<(), SynthesisError> { let comm_rs = self.comm_rs; let comm_cs = self.comm_cs; diff --git a/storage-proofs-post/src/rational/compound.rs b/storage-proofs-post/src/rational/compound.rs index aaca7aa26..11ac1928a 100644 --- a/storage-proofs-post/src/rational/compound.rs +++ b/storage-proofs-post/src/rational/compound.rs @@ -149,7 +149,7 @@ where } } -impl<'a, Tree: 'static + MerkleTreeTrait> RationalPoStCircuit { +impl RationalPoStCircuit { #[allow(clippy::type_complexity)] pub fn synthesize>( cs: &mut CS,