mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-31 04:21:23 +00:00
cargo fix --edition-idioms for bellman
This commit is contained in:
@@ -16,7 +16,7 @@ const MODULUS_R: Wrapping<u32> = Wrapping(64513);
|
|||||||
pub struct Fr(Wrapping<u32>);
|
pub struct Fr(Wrapping<u32>);
|
||||||
|
|
||||||
impl fmt::Display for Fr {
|
impl fmt::Display for Fr {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||||
write!(f, "{}", (self.0).0)
|
write!(f, "{}", (self.0).0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,7 +149,7 @@ impl PartialOrd for FrRepr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for FrRepr {
|
impl fmt::Display for FrRepr {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||||
write!(f, "{}", (self.0)[0])
|
write!(f, "{}", (self.0)[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,18 +1,16 @@
|
|||||||
extern crate ff;
|
|
||||||
extern crate group;
|
|
||||||
#[cfg(feature = "pairing")]
|
|
||||||
extern crate pairing;
|
|
||||||
extern crate rand_core;
|
|
||||||
|
|
||||||
extern crate bit_vec;
|
|
||||||
extern crate blake2s_simd;
|
|
||||||
extern crate byteorder;
|
|
||||||
extern crate futures;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[cfg(feature = "multicore")]
|
#[cfg(feature = "multicore")]
|
||||||
extern crate crossbeam;
|
extern crate crossbeam;
|
||||||
#[cfg(feature = "multicore")]
|
|
||||||
extern crate futures_cpupool;
|
|
||||||
#[cfg(feature = "multicore")]
|
#[cfg(feature = "multicore")]
|
||||||
extern crate num_cpus;
|
extern crate num_cpus;
|
||||||
|
|
||||||
@@ -23,11 +21,9 @@ extern crate hex_literal;
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
extern crate rand_xorshift;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
extern crate sha2;
|
|
||||||
|
|
||||||
pub mod domain;
|
pub mod domain;
|
||||||
pub mod gadgets;
|
pub mod gadgets;
|
||||||
@@ -230,7 +226,7 @@ impl Error for SynthesisError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for SynthesisError {
|
impl fmt::Display for SynthesisError {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||||
if let &SynthesisError::IoError(ref e) = self {
|
if let &SynthesisError::IoError(ref e) = self {
|
||||||
write!(f, "I/O error: ")?;
|
write!(f, "I/O error: ")?;
|
||||||
e.fmt(f)
|
e.fmt(f)
|
||||||
@@ -309,7 +305,7 @@ pub trait ConstraintSystem<E: ScalarEngine>: Sized {
|
|||||||
|
|
||||||
/// This is a "namespaced" constraint system which borrows a constraint system (pushing
|
/// This is a "namespaced" constraint system which borrows a constraint system (pushing
|
||||||
/// a namespace context) and, when dropped, pops out of the namespace context.
|
/// a namespace context) and, when dropped, pops out of the namespace context.
|
||||||
pub struct Namespace<'a, E: ScalarEngine, CS: ConstraintSystem<E> + 'a>(&'a mut CS, PhantomData<E>);
|
pub struct Namespace<'a, E: ScalarEngine, CS: ConstraintSystem<E>>(&'a mut CS, PhantomData<E>);
|
||||||
|
|
||||||
impl<'cs, E: ScalarEngine, CS: ConstraintSystem<E>> ConstraintSystem<E> for Namespace<'cs, E, CS> {
|
impl<'cs, E: ScalarEngine, CS: ConstraintSystem<E>> ConstraintSystem<E> for Namespace<'cs, E, CS> {
|
||||||
type Root = CS::Root;
|
type Root = CS::Root;
|
||||||
|
@@ -153,7 +153,7 @@ fn multiexp_inner<Q, D, G, S>(
|
|||||||
mut skip: u32,
|
mut skip: u32,
|
||||||
c: u32,
|
c: u32,
|
||||||
handle_trivial: bool,
|
handle_trivial: bool,
|
||||||
) -> Box<Future<Item = <G as CurveAffine>::Projective, Error = SynthesisError>>
|
) -> Box<dyn Future<Item = <G as CurveAffine>::Projective, Error = SynthesisError>>
|
||||||
where
|
where
|
||||||
for<'a> &'a Q: QueryDensity,
|
for<'a> &'a Q: QueryDensity,
|
||||||
D: Send + Sync + 'static + Clone + AsRef<Q>,
|
D: Send + Sync + 'static + Clone + AsRef<Q>,
|
||||||
@@ -256,7 +256,7 @@ pub fn multiexp<Q, D, G, S>(
|
|||||||
bases: S,
|
bases: S,
|
||||||
density_map: D,
|
density_map: D,
|
||||||
exponents: Arc<Vec<<<G::Engine as ScalarEngine>::Fr as PrimeField>::Repr>>,
|
exponents: Arc<Vec<<<G::Engine as ScalarEngine>::Fr as PrimeField>::Repr>>,
|
||||||
) -> Box<Future<Item = <G as CurveAffine>::Projective, Error = SynthesisError>>
|
) -> Box<dyn Future<Item = <G as CurveAffine>::Projective, Error = SynthesisError>>
|
||||||
where
|
where
|
||||||
for<'a> &'a Q: QueryDensity,
|
for<'a> &'a Q: QueryDensity,
|
||||||
D: Send + Sync + 'static + Clone + AsRef<Q>,
|
D: Send + Sync + 'static + Clone + AsRef<Q>,
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
extern crate bellman;
|
|
||||||
extern crate ff;
|
|
||||||
extern crate pairing;
|
|
||||||
extern crate rand;
|
|
||||||
|
|
||||||
// For randomness (during paramgen and proof generation)
|
// For randomness (during paramgen and proof generation)
|
||||||
use rand::thread_rng;
|
use rand::thread_rng;
|
||||||
|
Reference in New Issue
Block a user