diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6c8057..d5566a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: branches: master env: - MSRV: 1.63 + MSRV: 1.85 RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 0 RUST_BACKTRACE: 1 @@ -23,15 +23,13 @@ jobs: run: echo "::set-output name=msrv::$(echo $MSRV)" linux_foreign: + needs: set-msrv strategy: matrix: include: # 64-bit Linux/arm64 - target: aarch64-unknown-linux-gnu - # NOTE vmx 2024-07-15: Use at least Rust 1.68.2 for now, so that we can use the sparse - # index. Without this, the build times out. Once the MSRV is >= 1.68.2, we don't need - # to special case anymore and can use the MSRV instead. - toolchain: 1.68.2 + toolchain: ${{needs.set-msrv.outputs.msrv}} arch: aarch64 runs-on: ubuntu-22.04 diff --git a/Cargo.toml b/Cargo.toml index f9aa7aa..889ad62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/filecoin-project/blstrs" documentation = "https://docs.rs/blstrs" categories = ["cryptography", "algorithms"] readme = "README.md" -rust-version = "1.63" +rust-version = "1.85" [package.metadata.docs.rs] rustdoc-args = [ "--html-in-header", "katex-header.html" ] diff --git a/rust-toolchain b/rust-toolchain index af92bdd..f288d11 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.63.0 +1.85.0 diff --git a/src/macros.rs b/src/macros.rs index 19363c1..aeb733c 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -161,7 +161,7 @@ macro_rules! encoded_point_delegations { impl Eq for $t {} impl PartialOrd for $t { fn partial_cmp(&self, other: &$t) -> Option<::core::cmp::Ordering> { - PartialOrd::partial_cmp(&self.0[..], &other.0[..]) + Some(self.cmp(other)) } } impl Ord for $t { diff --git a/src/pairing.rs b/src/pairing.rs index 6d51899..38561db 100644 --- a/src/pairing.rs +++ b/src/pairing.rs @@ -174,7 +174,7 @@ impl pairing_lib::MillerLoopResult for MillerLoopResult { } } -impl<'a, 'b> Add<&'b MillerLoopResult> for &'a MillerLoopResult { +impl<'b> Add<&'b MillerLoopResult> for &MillerLoopResult { type Output = MillerLoopResult; #[inline] diff --git a/src/scalar.rs b/src/scalar.rs index 0cbbcff..05e1c60 100644 --- a/src/scalar.rs +++ b/src/scalar.rs @@ -388,7 +388,7 @@ impl Field for Scalar { // (t - 1) // 2 = 6104339283789297388802252303364915521546564123189034618274734669823 ff::helpers::sqrt_tonelli_shanks( self, - &[ + [ 0x7fff_2dff_7fff_ffff, 0x04d0_ec02_a9de_d201, 0x94ce_bea4_199c_ec04,