From e1a4785730a7d64d7d612ba8e3b103e46d0ee4ed Mon Sep 17 00:00:00 2001 From: jowparks Date: Tue, 12 Mar 2024 14:11:25 -0700 Subject: [PATCH] chore: rust update (#4838) --- ironfish-rust/src/keys/mod.rs | 1 - ironfish-rust/src/serializing/mod.rs | 2 +- ironfish-rust/src/test_util.rs | 1 - ironfish-rust/src/transaction/tests.rs | 1 - ironfish-zkp/src/circuits/spend.rs | 4 ++-- rust-toolchain.toml | 2 +- 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ironfish-rust/src/keys/mod.rs b/ironfish-rust/src/keys/mod.rs index f621686398..5797f6f1fd 100644 --- a/ironfish-rust/src/keys/mod.rs +++ b/ironfish-rust/src/keys/mod.rs @@ -13,7 +13,6 @@ use group::GroupEncoding; use ironfish_zkp::constants::{ CRH_IVK_PERSONALIZATION, PROOF_GENERATION_KEY_GENERATOR, SPENDING_KEY_GENERATOR, }; -use ironfish_zkp::ProofGenerationKey; use jubjub::SubgroupPoint; use rand::prelude::*; diff --git a/ironfish-rust/src/serializing/mod.rs b/ironfish-rust/src/serializing/mod.rs index 8e8752edce..1555eaf690 100644 --- a/ironfish-rust/src/serializing/mod.rs +++ b/ironfish-rust/src/serializing/mod.rs @@ -72,7 +72,7 @@ pub fn hex_to_vec_bytes(hex: &str) -> Result, IronfishError> { let hex_iter = hex.as_bytes().chunks_exact(2); - for (_, hex) in hex_iter.enumerate() { + for hex in hex_iter { bytes.push(hex_to_u8(hex[0])? << 4 | hex_to_u8(hex[1])?); } diff --git a/ironfish-rust/src/test_util.rs b/ironfish-rust/src/test_util.rs index b015c8c7dd..5e80ebf9f3 100644 --- a/ironfish-rust/src/test_util.rs +++ b/ironfish-rust/src/test_util.rs @@ -63,7 +63,6 @@ pub(crate) fn auth_path_to_root_hash( /// Helper function to create a list of random identifiers for multisig participants. pub fn create_multisig_identities(num_identifiers: usize) -> Vec { (0..num_identifiers) - .into_iter() .map(|_| Secret::random(thread_rng()).to_identity()) .collect() } diff --git a/ironfish-rust/src/transaction/tests.rs b/ironfish-rust/src/transaction/tests.rs index b83a862c75..5e24aef5a1 100644 --- a/ironfish-rust/src/transaction/tests.rs +++ b/ironfish-rust/src/transaction/tests.rs @@ -385,7 +385,6 @@ fn test_transaction_version_is_checked() { let valid_versions = [1u8, 2u8]; let invalid_versions = (u8::MIN..=u8::MAX) - .into_iter() .filter(|v| !valid_versions.contains(v)) .collect::>(); assert_eq!(invalid_versions.len(), 254); diff --git a/ironfish-zkp/src/circuits/spend.rs b/ironfish-zkp/src/circuits/spend.rs index 0b6d658177..7546711dad 100644 --- a/ironfish-zkp/src/circuits/spend.rs +++ b/ironfish-zkp/src/circuits/spend.rs @@ -501,7 +501,7 @@ mod test { let tree_depth = 32; - let expected_commitment_us = vec![ + let expected_commitment_us = [ "43821661663052659750276289184181083197337192946256245809816728673021647664276", "3307162152126086816128645612622677680790809218093944138874328908293932504970", "11069610839860164669107523771435662310747439806735198902948128278779049984187", @@ -509,7 +509,7 @@ mod test { "21486204115269202361511785053830008932611482941164104173096094940232117952518", ]; - let expected_commitment_vs = vec![ + let expected_commitment_vs = [ "27630722367128086497290371604583225252915685718989450292520883698391703910", "50661753032157861157033186529508424590095922868336394465083465551064239171765", "42720677731824278375166374390978871535259136440715287500660141460976255671332", diff --git a/rust-toolchain.toml b/rust-toolchain.toml index f701aa5354..624eb0ea63 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.66.1" +channel = "1.76.0"