From 8d85ef9b0a0e102bdd804ae549272a5b7597c328 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Mon, 4 Sep 2023 16:07:46 +0200 Subject: [PATCH] fix: increase MSRV The minimum supported Rust version is now 1.63, due to the tempfile dependency. Also fix/silence newly introduced Clippy warnings. --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- bls-signatures-ffi/src/lib.rs | 4 +++- rust-toolchain | 2 +- src/key.rs | 4 ++-- src/signature.rs | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85ca881..42045db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: branches: master env: - MSRV: 1.59.0 + MSRV: 1.63.0 RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 0 RUST_BACKTRACE: 1 diff --git a/Cargo.toml b/Cargo.toml index d88386f..673c235 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["dignifiedquire "] license = "MIT OR Apache-2.0" edition = "2018" resolver = "2" -rust-version = "1.59.0" +rust-version = "1.63.0" description = "Aggregate BLS Signatures" documentation = "https://docs.rs/bls-signatures" diff --git a/bls-signatures-ffi/src/lib.rs b/bls-signatures-ffi/src/lib.rs index b4a48ae..a8eec5b 100644 --- a/bls-signatures-ffi/src/lib.rs +++ b/bls-signatures-ffi/src/lib.rs @@ -1,3 +1,5 @@ +#![allow(clippy::missing_safety_doc)] + use std::slice::from_raw_parts; #[cfg(feature = "pairing")] @@ -86,7 +88,7 @@ pub unsafe extern "C" fn aggregate( let signatures = try_ffi!( parts - .map(|item| Signature::from_bytes(item)) + .map(Signature::from_bytes) .collect::, _>>(), std::ptr::null_mut() ); diff --git a/rust-toolchain b/rust-toolchain index bb120e8..af92bdd 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.59.0 +1.63.0 diff --git a/src/key.rs b/src/key.rs index c63be08..b7797f9 100644 --- a/src/key.rs +++ b/src/key.rs @@ -23,10 +23,10 @@ use crate::signature::*; pub(crate) const G1_COMPRESSED_SIZE: usize = 48; -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct PublicKey(pub(crate) G1Projective); -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct PrivateKey(pub(crate) Scalar); impl From for PublicKey { diff --git a/src/signature.rs b/src/signature.rs index 6c0ac03..5e662f9 100644 --- a/src/signature.rs +++ b/src/signature.rs @@ -24,7 +24,7 @@ use crate::key::*; const CSUITE: &[u8] = b"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_"; const G2_COMPRESSED_SIZE: usize = 96; -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, Eq, PartialEq)] pub struct Signature(G2Affine); impl From for Signature {