From 54026f5fe7e0b5a52e446ac01a50469da1f15a71 Mon Sep 17 00:00:00 2001 From: Andreas Fackler Date: Sat, 27 Oct 2018 18:05:31 +0200 Subject: [PATCH] Upgrade to Rust 1.30.0. --- .travis.yml | 2 +- Cargo.toml | 24 ++++++++++++------------ benches/bench.rs | 2 +- ci.sh | 4 ++-- src/mock/ms8.rs | 2 ++ 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index f042a75..8a0d399 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: rust rust: - - 1.29.1 + - 1.30.0 cache: cargo: true timeout: 1200 diff --git a/Cargo.toml b/Cargo.toml index e892409..c3c8700 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,26 +18,26 @@ repository = "https://github.com/poanetwork/threshold_crypto" description = "Pairing threshold cryptography" [dependencies] -byteorder = "1.2.3" +byteorder = "1.2.7" errno = "0.2.4" -failure = "0.1" -hex_fmt = "0.2" +failure = "0.1.3" +hex_fmt = "0.2.0" init_with = "1.1.0" lazy_static = "1.1.0" -log = "0.4.1" +log = "0.4.5" memsec = "0.5.4" pairing = { version = "0.14.2", features = ["u128-support"] } -rand = "0.4.2" +rand = "0.4.3" rand_derive = "0.3.1" -serde = "1.0.55" -serde_derive = "1.0.55" -tiny-keccak = "1.4" +serde = "1.0.80" +serde_derive = "1.0.80" +tiny-keccak = "1.4.2" [dev-dependencies] -bincode = "1.0.0" -criterion = "0.2" -rand = "0.4.2" -serde_derive = "1.0.55" +bincode = "1.0.1" +criterion = "0.2.5" +rand = "0.4.3" +serde_derive = "1.0.80" [[bench]] name = "bench" diff --git a/benches/bench.rs b/benches/bench.rs index 0929a59..c628b4b 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -102,7 +102,7 @@ mod public_key_set_benches { move |b, &&threshold| { let sk_set = SecretKeySet::random(threshold, &mut rng); let pk_set = sk_set.public_keys(); - let mut sig_parts: Vec = (0..threshold + 1).collect(); + let mut sig_parts: Vec = (0..=threshold).collect(); let pieces: &mut [usize] = &mut sig_parts; let sigs: BTreeMap<_, _> = pieces .iter() diff --git a/ci.sh b/ci.sh index 248837d..dabcb92 100755 --- a/ci.sh +++ b/ci.sh @@ -7,8 +7,8 @@ export RUST_BACKTRACE=1 # Enables additional cpu-specific optimizations. export RUSTFLAGS="-D warnings -C target-cpu=native" -cargo clippy --tests --examples --benches -- --deny clippy -cargo clippy --all-features --tests --examples --benches -- --deny clippy +cargo clippy --tests --examples --benches -- --deny clippy::all +cargo clippy --all-features --tests --examples --benches -- --deny clippy::all cargo fmt -- --check cargo test cargo test --all-features diff --git a/src/mock/ms8.rs b/src/mock/ms8.rs index 38f37ab..f792dbc 100644 --- a/src/mock/ms8.rs +++ b/src/mock/ms8.rs @@ -431,6 +431,8 @@ mod tests { // We test a few mathematical identities, including `c - c = 0`. Clippy complains about these // otherwise unusual expressions, so the lint is disabled. #![cfg_attr(feature = "cargo-clippy", allow(eq_op))] + // Some test functions contain long lists of assertions. Clippy thinks they are too complex. + #![cfg_attr(feature = "cargo-clippy", allow(cyclomatic_complexity))] use super::{ext_euclid, modular_pow, Mersenne8}; use pairing::Field;