Cargo fix update. Also update dependencies, minus lazy static due to issues with criterion.

master
David Irvine 6 years ago committed by Andreas Fackler
parent dbb9fae896
commit 43f615c953
  1. 22
      Cargo.toml
  2. 14
      src/lib.rs
  3. 4
      src/poly.rs
  4. 2
      src/serde_impl.rs

@ -21,24 +21,24 @@ edition = "2018"
[dependencies] [dependencies]
byteorder = "1.2.7" byteorder = "1.2.7"
errno = "0.2.4" errno = "0.2.4"
failure = "0.1.3" failure = "0.1.5"
hex_fmt = "0.2.0" hex_fmt = "0.3.0"
lazy_static = "1.1.0" lazy_static = "1.1.0"
log = "0.4.5" log = "0.4.6"
memsec = "0.5.4" memsec = "0.5.4"
pairing = { version = "0.14.2", features = ["u128-support"] } pairing = { version = "0.14.2", features = ["u128-support"] }
rand = "0.6.1" rand = "0.6.4"
rand04_compat = "0.1.0" rand04_compat = "0.1.1"
rand_chacha = "0.1.0" rand_chacha = "0.1.1"
serde = "1.0.80" serde = "1.0.84"
serde_derive = "1.0.80" serde_derive = "1.0.84"
tiny-keccak = "1.4.2" tiny-keccak = "1.4.2"
[dev-dependencies] [dev-dependencies]
bincode = "1.0.1" bincode = "1.0.1"
criterion = "0.2.5" criterion = "0.2.7"
serde_derive = "1.0.80" serde_derive = "1.0.84"
rand_xorshift = "0.1.0" rand_xorshift = "0.1.1"
[[bench]] [[bench]]
name = "bench" name = "bench"

@ -11,7 +11,7 @@
)] )]
#![warn(missing_docs)] #![warn(missing_docs)]
pub extern crate pairing; pub use pairing;
mod into_fr; mod into_fr;
mod secret; mod secret;
@ -72,7 +72,7 @@ impl Hash for PublicKey {
} }
impl fmt::Debug for PublicKey { impl fmt::Debug for PublicKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let uncomp = self.0.into_affine().into_uncompressed(); let uncomp = self.0.into_affine().into_uncompressed();
write!(f, "PublicKey({:0.10})", HexFmt(uncomp)) write!(f, "PublicKey({:0.10})", HexFmt(uncomp))
} }
@ -133,7 +133,7 @@ impl PublicKey {
pub struct PublicKeyShare(PublicKey); pub struct PublicKeyShare(PublicKey);
impl fmt::Debug for PublicKeyShare { impl fmt::Debug for PublicKeyShare {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let uncomp = (self.0).0.into_affine().into_uncompressed(); let uncomp = (self.0).0.into_affine().into_uncompressed();
write!(f, "PublicKeyShare({:0.10})", HexFmt(uncomp)) write!(f, "PublicKeyShare({:0.10})", HexFmt(uncomp))
} }
@ -182,7 +182,7 @@ impl Distribution<Signature> for Standard {
} }
impl fmt::Debug for Signature { impl fmt::Debug for Signature {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let uncomp = self.0.into_affine().into_uncompressed(); let uncomp = self.0.into_affine().into_uncompressed();
write!(f, "Signature({:0.10})", HexFmt(uncomp)) write!(f, "Signature({:0.10})", HexFmt(uncomp))
} }
@ -233,7 +233,7 @@ impl Distribution<SignatureShare> for Standard {
} }
impl fmt::Debug for SignatureShare { impl fmt::Debug for SignatureShare {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let uncomp = (self.0).0.into_affine().into_uncompressed(); let uncomp = (self.0).0.into_affine().into_uncompressed();
write!(f, "SignatureShare({:0.10})", HexFmt(uncomp)) write!(f, "SignatureShare({:0.10})", HexFmt(uncomp))
} }
@ -287,7 +287,7 @@ impl Drop for SecretKey {
} }
/// A debug statement where the secret prime field element is redacted. /// A debug statement where the secret prime field element is redacted.
impl fmt::Debug for SecretKey { impl fmt::Debug for SecretKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("SecretKey").field(&"...").finish() f.debug_tuple("SecretKey").field(&"...").finish()
} }
} }
@ -374,7 +374,7 @@ impl Distribution<SecretKeyShare> for Standard {
} }
impl fmt::Debug for SecretKeyShare { impl fmt::Debug for SecretKeyShare {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("SecretKeyShare").field(&"...").finish() f.debug_tuple("SecretKeyShare").field(&"...").finish()
} }
} }

@ -49,7 +49,7 @@ impl Clone for Poly {
/// A debug statement where the `coeff` vector of prime field elements has been redacted. /// A debug statement where the `coeff` vector of prime field elements has been redacted.
impl Debug for Poly { impl Debug for Poly {
fn fmt(&self, f: &mut Formatter) -> fmt::Result { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.debug_struct("Poly").field("coeff", &"...").finish() f.debug_struct("Poly").field("coeff", &"...").finish()
} }
} }
@ -530,7 +530,7 @@ impl Drop for BivarPoly {
/// A debug statement where the `coeff` vector has been redacted. /// A debug statement where the `coeff` vector has been redacted.
impl Debug for BivarPoly { impl Debug for BivarPoly {
fn fmt(&self, f: &mut Formatter) -> fmt::Result { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.debug_struct("BivarPoly") f.debug_struct("BivarPoly")
.field("degree", &self.degree) .field("degree", &self.degree)
.field("coeff", &"...") .field("coeff", &"...")

@ -82,7 +82,7 @@ pub(crate) mod projective {
impl<'de, C: CurveProjective> Visitor<'de> for TupleVisitor<C> { impl<'de, C: CurveProjective> Visitor<'de> for TupleVisitor<C> {
type Value = C; type Value = C;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { fn expecting(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let len = <C::Affine as CurveAffine>::Compressed::size(); let len = <C::Affine as CurveAffine>::Compressed::size();
write!(f, "a tuple of size {}", len) write!(f, "a tuple of size {}", len)
} }

Loading…
Cancel
Save