From 2f145fa9ae453699c193c1503cf2c97fbea6d9b7 Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 27 Nov 2024 14:18:25 -0800 Subject: [PATCH] Remove unnecessary qualifications from Rust code These are qualifications that rust 1.76 (specified in `rust-toolchain.toml` does not detect, but the latest version of Rust detects and warns about. --- ironfish-rust/src/mining/thread.rs | 5 +---- ironfish-rust/src/transaction/mints.rs | 2 +- ironfish-rust/src/transaction/spends.rs | 2 +- ironfish-zkp/src/circuits/util.rs | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ironfish-rust/src/mining/thread.rs b/ironfish-rust/src/mining/thread.rs index 45e2a783d4..4d76887957 100644 --- a/ironfish-rust/src/mining/thread.rs +++ b/ironfish-rust/src/mining/thread.rs @@ -48,10 +48,7 @@ impl Thread { .name(id.to_string()) .spawn(move || { let mut fish_hash_context = if fish_hash_options.enabled { - Some(fish_hash::Context::new( - fish_hash_options.full_context, - None, - )) + Some(Context::new(fish_hash_options.full_context, None)) } else { None }; diff --git a/ironfish-rust/src/transaction/mints.rs b/ironfish-rust/src/transaction/mints.rs index 7fd1503622..3d43f4d903 100644 --- a/ironfish-rust/src/transaction/mints.rs +++ b/ironfish-rust/src/transaction/mints.rs @@ -336,7 +336,7 @@ impl MintDescription { transfer_ownership_to = None; } - let authorizing_signature = redjubjub::Signature::read(&mut reader)?; + let authorizing_signature = Signature::read(&mut reader)?; Ok(MintDescription { proof, diff --git a/ironfish-rust/src/transaction/spends.rs b/ironfish-rust/src/transaction/spends.rs index 5122429c3e..3e8fa62b7f 100644 --- a/ironfish-rust/src/transaction/spends.rs +++ b/ironfish-rust/src/transaction/spends.rs @@ -268,7 +268,7 @@ impl SpendDescription { let tree_size = reader.read_u32::()?; let mut nullifier = Nullifier([0; 32]); reader.read_exact(&mut nullifier.0)?; - let authorizing_signature = redjubjub::Signature::read(&mut reader)?; + let authorizing_signature = Signature::read(&mut reader)?; Ok(SpendDescription { proof, diff --git a/ironfish-zkp/src/circuits/util.rs b/ironfish-zkp/src/circuits/util.rs index 488ad6a33f..b9dfcc7f32 100644 --- a/ironfish-zkp/src/circuits/util.rs +++ b/ironfish-zkp/src/circuits/util.rs @@ -135,7 +135,7 @@ pub(crate) fn assert_valid_asset_generator> // Compare the generator bits to the computed generator bits, proving that // this is the asset id that derived the generator for i in 0..256 { - boolean::Boolean::enforce_equal( + Boolean::enforce_equal( cs.namespace(|| format!("asset generator bit {} equality", i)), &asset_generator_bits[i], &asset_generator_repr[i],