Skip to content

Commit

Permalink
chore: unpin nightly in ci, clippy (#7345)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Mar 8, 2024
1 parent 55c30dd commit 0ab9e3c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
2 changes: 1 addition & 1 deletion crates/evm/core/src/backend/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl<T> BackendSnapshot<T> {
/// 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(&current.logs);
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/evm/evm/src/executors/invariant/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/evm/traces/src/decoder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion crates/script/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/script/src/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 0ab9e3c

Please sign in to comment.