From 3d21ad0158e1e8df1f75da47d51d75ec595b3d5a Mon Sep 17 00:00:00 2001 From: bkioshn Date: Tue, 26 Aug 2025 22:46:29 +0700 Subject: [PATCH 1/3] fix: bump rustci from 3.5.7 to 3.5.10 Signed-off-by: bkioshn --- rust/Earthfile | 2 +- rust/c509-certificate/Earthfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/Earthfile b/rust/Earthfile index 0d8c86c65e9..3926a18a418 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.5.7 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.5.10 AS rust-ci IMPORT ../ AS repo-ci COPY_SRC: diff --git a/rust/c509-certificate/Earthfile b/rust/c509-certificate/Earthfile index 0a870849181..b03dcd8dce5 100644 --- a/rust/c509-certificate/Earthfile +++ b/rust/c509-certificate/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.5.7 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.5.10 AS rust-ci IMPORT .. AS rust-local IMPORT ../.. AS repo From 0ee04d53694e9b8fc99d740af1a3d4f4fa53c51f Mon Sep 17 00:00:00 2001 From: bkioshn Date: Tue, 26 Aug 2025 22:46:46 +0700 Subject: [PATCH 2/3] fix: bump rust from 1.88 to 1.89 Signed-off-by: bkioshn --- rust/rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/rust-toolchain.toml b/rust/rust-toolchain.toml index 17b9824d906..e9026cc826d 100644 --- a/rust/rust-toolchain.toml +++ b/rust/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.88" +channel = "1.89" profile = "default" \ No newline at end of file From e6a55d473cce96a111a44be6e0d661c10e84949f Mon Sep 17 00:00:00 2001 From: bkioshn Date: Wed, 27 Aug 2025 15:17:38 +0700 Subject: [PATCH 3/3] fix: allow explicit_deref_methods Signed-off-by: bkioshn --- rust/cardano-chain-follower/src/mithril_snapshot_config.rs | 5 ++--- rust/catalyst-voting/benches/vote_protocol.rs | 3 ++- rust/catalyst-voting/src/crypto/babystep_giantstep.rs | 1 + rust/catalyst-voting/src/crypto/zk_unit_vector/decoding.rs | 1 + rust/catalyst-voting/src/crypto/zk_unit_vector/mod.rs | 1 + rust/catalyst-voting/src/vote_protocol/voter/decoding.rs | 1 + rust/catalyst-voting/tests/voting_test.rs | 1 + rust/rbac-registration/src/cardano/cip509/validation.rs | 2 +- rust/vote-tx-v1/src/decoding.rs | 1 + rust/vote-tx-v1/src/lib.rs | 1 + rust/vote-tx-v2/src/gen_tx/mod.rs | 1 + 11 files changed, 13 insertions(+), 5 deletions(-) diff --git a/rust/cardano-chain-follower/src/mithril_snapshot_config.rs b/rust/cardano-chain-follower/src/mithril_snapshot_config.rs index 1e6fff6eeb9..ec2456e7b64 100644 --- a/rust/cardano-chain-follower/src/mithril_snapshot_config.rs +++ b/rust/cardano-chain-follower/src/mithril_snapshot_config.rs @@ -452,9 +452,8 @@ fn check_writable(path: &Path) -> bool { } // Can't read the directory for any reason, so can't write to the directory. - let path_iterator = match path.read_dir() { - Err(_) => return false, - Ok(entries) => entries, + let Ok(path_iterator) = path.read_dir() else { + return false; }; // Recursively check the contents of the directory diff --git a/rust/catalyst-voting/benches/vote_protocol.rs b/rust/catalyst-voting/benches/vote_protocol.rs index 38dea85e556..64077920c0e 100644 --- a/rust/catalyst-voting/benches/vote_protocol.rs +++ b/rust/catalyst-voting/benches/vote_protocol.rs @@ -8,7 +8,8 @@ missing_docs, clippy::missing_docs_in_private_items, clippy::unwrap_used, - clippy::similar_names + clippy::similar_names, + clippy::explicit_deref_methods )] use catalyst_voting::{ diff --git a/rust/catalyst-voting/src/crypto/babystep_giantstep.rs b/rust/catalyst-voting/src/crypto/babystep_giantstep.rs index 431d37e5e1b..841f76030c5 100644 --- a/rust/catalyst-voting/src/crypto/babystep_giantstep.rs +++ b/rust/catalyst-voting/src/crypto/babystep_giantstep.rs @@ -101,6 +101,7 @@ impl BabyStepGiantStep { } #[cfg(test)] +#[allow(clippy::explicit_deref_methods)] mod tests { use std::ops::Mul; diff --git a/rust/catalyst-voting/src/crypto/zk_unit_vector/decoding.rs b/rust/catalyst-voting/src/crypto/zk_unit_vector/decoding.rs index 6f743e655aa..7fe241eb637 100644 --- a/rust/catalyst-voting/src/crypto/zk_unit_vector/decoding.rs +++ b/rust/catalyst-voting/src/crypto/zk_unit_vector/decoding.rs @@ -155,6 +155,7 @@ impl ResponseRandomness { } #[cfg(test)] +#[allow(clippy::explicit_deref_methods)] mod tests { use test_strategy::proptest; diff --git a/rust/catalyst-voting/src/crypto/zk_unit_vector/mod.rs b/rust/catalyst-voting/src/crypto/zk_unit_vector/mod.rs index d9266477179..7ba16817b59 100644 --- a/rust/catalyst-voting/src/crypto/zk_unit_vector/mod.rs +++ b/rust/catalyst-voting/src/crypto/zk_unit_vector/mod.rs @@ -285,6 +285,7 @@ mod arbitrary_impl { } #[cfg(test)] +#[allow(clippy::explicit_deref_methods)] mod tests { use proptest::sample::size_range; use rand_core::OsRng; diff --git a/rust/catalyst-voting/src/vote_protocol/voter/decoding.rs b/rust/catalyst-voting/src/vote_protocol/voter/decoding.rs index c746a140545..21355acc12c 100644 --- a/rust/catalyst-voting/src/vote_protocol/voter/decoding.rs +++ b/rust/catalyst-voting/src/vote_protocol/voter/decoding.rs @@ -84,6 +84,7 @@ impl VoterProof { } #[cfg(test)] +#[allow(clippy::explicit_deref_methods)] mod tests { use std::io::Cursor; diff --git a/rust/catalyst-voting/tests/voting_test.rs b/rust/catalyst-voting/tests/voting_test.rs index 1e699bd4b8b..dad2adeab20 100644 --- a/rust/catalyst-voting/tests/voting_test.rs +++ b/rust/catalyst-voting/tests/voting_test.rs @@ -1,4 +1,5 @@ //! A general voting integration test, which performs a full voting procedure. +#![allow(clippy::explicit_deref_methods)] use catalyst_voting::vote_protocol::{ committee::ElectionSecretKey, diff --git a/rust/rbac-registration/src/cardano/cip509/validation.rs b/rust/rbac-registration/src/cardano/cip509/validation.rs index 36d0dd5ece4..a71ff954f29 100644 --- a/rust/rbac-registration/src/cardano/cip509/validation.rs +++ b/rust/rbac-registration/src/cardano/cip509/validation.rs @@ -127,7 +127,7 @@ pub fn validate_stake_public_key( let context = "Cip509 stake public key validation"; let transaction = MultiEraTx::Conway(Box::new(Cow::Borrowed(transaction))); - let witness = match TxnWitness::new(&[transaction.clone()]) { + let witness = match TxnWitness::new(std::slice::from_ref(&transaction)) { Ok(w) => w, Err(e) => { report.other(&format!("Failed to create TxWitness: {e:?}"), context); diff --git a/rust/vote-tx-v1/src/decoding.rs b/rust/vote-tx-v1/src/decoding.rs index 1650b1edecd..c5e2ccb2df1 100644 --- a/rust/vote-tx-v1/src/decoding.rs +++ b/rust/vote-tx-v1/src/decoding.rs @@ -219,6 +219,7 @@ impl Tx { } #[cfg(test)] +#[allow(clippy::explicit_deref_methods)] mod tests { use catalyst_voting::{ crypto::{ed25519::PrivateKey, rng::rand_core::OsRng}, diff --git a/rust/vote-tx-v1/src/lib.rs b/rust/vote-tx-v1/src/lib.rs index 5874c4944b2..c6e7282d320 100644 --- a/rust/vote-tx-v1/src/lib.rs +++ b/rust/vote-tx-v1/src/lib.rs @@ -326,6 +326,7 @@ impl VotePayload { } #[cfg(test)] +#[allow(clippy::explicit_deref_methods)] mod tests { use catalyst_voting::{ crypto::ed25519::PrivateKey, vote_protocol::committee::ElectionSecretKey, diff --git a/rust/vote-tx-v2/src/gen_tx/mod.rs b/rust/vote-tx-v2/src/gen_tx/mod.rs index fed0d288ac4..9d69e2efed9 100644 --- a/rust/vote-tx-v2/src/gen_tx/mod.rs +++ b/rust/vote-tx-v2/src/gen_tx/mod.rs @@ -124,6 +124,7 @@ fn cose_protected_header() -> coset::Header { .build() } +#[allow(clippy::explicit_deref_methods)] #[cfg(test)] mod tests { use proptest::{prelude::any_with, sample::size_range};