diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 13e2d43670fa..ffef82ca5edc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -133,8 +133,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@clippy - with: - toolchain: nightly-2024-02-03 - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 7a1d4195d73b..cfee46312f41 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -963,7 +963,7 @@ impl Config { (Ok(mut config), Some(key)) => { // we update the key, because if an etherscan_api_key is set, it should take // precedence over the entry, since this is usually set via env var or CLI args. - config.key = key.clone(); + config.key.clone_from(key); return Ok(Some(config)) } (Ok(config), None) => return Ok(Some(config)), diff --git a/crates/evm/core/src/backend/snapshot.rs b/crates/evm/core/src/backend/snapshot.rs index 35ca9222b88a..53ce6f7ddb35 100644 --- a/crates/evm/core/src/backend/snapshot.rs +++ b/crates/evm/core/src/backend/snapshot.rs @@ -39,7 +39,7 @@ impl BackendSnapshot { /// journaled_state includes the same logs, we can simply replace use that See also /// `DatabaseExt::revert` pub fn merge(&mut self, current: &JournaledState) { - self.journaled_state.logs = current.logs.clone(); + self.journaled_state.logs.clone_from(¤t.logs); } } diff --git a/crates/evm/evm/src/executors/invariant/mod.rs b/crates/evm/evm/src/executors/invariant/mod.rs index 2ec627b11e36..0a7b81943d83 100644 --- a/crates/evm/evm/src/executors/invariant/mod.rs +++ b/crates/evm/evm/src/executors/invariant/mod.rs @@ -236,7 +236,7 @@ impl<'a> InvariantExecutor<'a> { ); if !can_continue || current_run == self.config.depth - 1 { - *last_run_calldata.borrow_mut() = inputs.clone(); + last_run_calldata.borrow_mut().clone_from(&inputs); } if !can_continue { diff --git a/crates/evm/traces/src/decoder/mod.rs b/crates/evm/traces/src/decoder/mod.rs index 78193a5f9cee..2eac34d003a8 100644 --- a/crates/evm/traces/src/decoder/mod.rs +++ b/crates/evm/traces/src/decoder/mod.rs @@ -189,7 +189,7 @@ impl CallTraceDecoder { let default_labels = &Self::new().labels; if self.labels.len() > default_labels.len() { - self.labels = default_labels.clone(); + self.labels.clone_from(default_labels); } self.receive_contracts.clear(); diff --git a/crates/script/src/lib.rs b/crates/script/src/lib.rs index 6d8fb87b8329..ef579716f2f6 100644 --- a/crates/script/src/lib.rs +++ b/crates/script/src/lib.rs @@ -605,7 +605,6 @@ impl ScriptConfig { #[cfg(test)] mod tests { use super::*; - use foundry_cli::utils::LoadConfig; use foundry_config::{NamedChain, UnresolvedEnvVarError}; use std::fs; use tempfile::tempdir; diff --git a/crates/script/src/sequence.rs b/crates/script/src/sequence.rs index 6a78d1ac4f58..9fdee7b021bf 100644 --- a/crates/script/src/sequence.rs +++ b/crates/script/src/sequence.rs @@ -365,7 +365,7 @@ impl ScriptSequence { self.transactions .iter_mut() .enumerate() - .for_each(|(i, tx)| tx.rpc = sensitive.transactions[i].rpc.clone()); + .for_each(|(i, tx)| tx.rpc.clone_from(&sensitive.transactions[i].rpc)); } }