From 8e535227805298b95b16b1a5fe3c586ccc33bb3a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:03:36 -0500 Subject: [PATCH] November 2022 - Rust Nightly Update (#144) * Update nightly * Have the latest nightly clippy pass Co-authored-by: GitHub Actions <> Co-authored-by: Luke Parker --- .github/nightly-version | 2 +- coins/monero/src/rpc.rs | 4 ++-- crypto/ciphersuite/src/ed448.rs | 2 +- crypto/frost/src/curve/ed448.rs | 2 +- crypto/frost/src/curve/mod.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/nightly-version b/.github/nightly-version index 3b012ca6..6dc33dd9 100644 --- a/.github/nightly-version +++ b/.github/nightly-version @@ -1 +1 @@ -nightly-2022-10-01 +nightly-2022-11-01 diff --git a/coins/monero/src/rpc.rs b/coins/monero/src/rpc.rs index af80a581..d3851f84 100644 --- a/coins/monero/src/rpc.rs +++ b/coins/monero/src/rpc.rs @@ -89,7 +89,7 @@ impl Rpc { params: Option, ) -> Result { let client = reqwest::Client::new(); - let mut builder = client.post(&(self.0.clone() + "/" + method)); + let mut builder = client.post(self.0.clone() + "/" + method); if let Some(params) = params.as_ref() { builder = builder.json(params); } @@ -104,7 +104,7 @@ impl Rpc { params: Vec, ) -> Result { let client = reqwest::Client::new(); - let builder = client.post(&(self.0.clone() + "/" + method)).body(params); + let builder = client.post(self.0.clone() + "/" + method).body(params); self.call_tail(method, builder.header("Content-Type", "application/octet-stream")).await } diff --git a/crypto/ciphersuite/src/ed448.rs b/crypto/ciphersuite/src/ed448.rs index d5075b9e..43b88ef3 100644 --- a/crypto/ciphersuite/src/ed448.rs +++ b/crypto/ciphersuite/src/ed448.rs @@ -62,6 +62,6 @@ impl Ciphersuite for Ed448 { } fn hash_to_F(dst: &[u8], data: &[u8]) -> Self::F { - Scalar::wide_reduce(Self::H::digest(&[dst, data].concat()).as_ref().try_into().unwrap()) + Scalar::wide_reduce(Self::H::digest([dst, data].concat()).as_ref().try_into().unwrap()) } } diff --git a/crypto/frost/src/curve/ed448.rs b/crypto/frost/src/curve/ed448.rs index e6035048..05877dbe 100644 --- a/crypto/frost/src/curve/ed448.rs +++ b/crypto/frost/src/curve/ed448.rs @@ -21,7 +21,7 @@ impl Ietf8032Ed448Hram { pub fn hram(context: &[u8], R: &Point, A: &Point, m: &[u8]) -> Scalar { Scalar::wide_reduce( Shake256_114::digest( - &[ + [ &[b"SigEd448".as_ref(), &[0, u8::try_from(context.len()).unwrap()]].concat(), context, &[R.to_bytes().as_ref(), A.to_bytes().as_ref(), m].concat(), diff --git a/crypto/frost/src/curve/mod.rs b/crypto/frost/src/curve/mod.rs index a8bf4ad1..8fbdd4b8 100644 --- a/crypto/frost/src/curve/mod.rs +++ b/crypto/frost/src/curve/mod.rs @@ -41,7 +41,7 @@ pub trait Curve: Ciphersuite { /// Hash the given dst and data to a byte vector. Used to instantiate H4 and H5. fn hash_to_vec(dst: &[u8], data: &[u8]) -> Vec { - Self::H::digest(&[Self::CONTEXT, dst, data].concat()).as_ref().to_vec() + Self::H::digest([Self::CONTEXT, dst, data].concat()).as_ref().to_vec() } /// Field element from hash. Used during key gen and by other crates under Serai as a general