mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
clippy: add implicit_clone clippy lint (#10529)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Oliver <onbjerg@users.noreply.github.com>
This commit is contained in:
@ -216,6 +216,7 @@ unused_rounding = "warn"
|
||||
use_self = "warn"
|
||||
useless_let_if_seq = "warn"
|
||||
zero_sized_map_values = "warn"
|
||||
implicit_clone = "warn"
|
||||
cloned_instead_of_copied = "warn"
|
||||
option_as_ref_cloned = "warn"
|
||||
|
||||
|
||||
@ -299,7 +299,7 @@ mod tests {
|
||||
let expected = entries[id];
|
||||
assert_eq!(
|
||||
entry.unwrap(),
|
||||
(expected.0.encode().to_vec(), expected.1.compress().to_vec())
|
||||
(expected.0.encode().to_vec(), expected.1.compress().clone())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -295,7 +295,7 @@ impl<D> ChainPath<D> {
|
||||
pub fn static_files(&self) -> PathBuf {
|
||||
let datadir_args = &self.2;
|
||||
if let Some(static_files_path) = &datadir_args.static_files_path {
|
||||
static_files_path.to_path_buf()
|
||||
static_files_path.clone()
|
||||
} else {
|
||||
self.data_dir().join("static_files")
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ impl Transaction {
|
||||
match self {
|
||||
Self::Legacy(_) | Self::Eip2930(_) | Self::Eip1559(_) | Self::Eip7702(_) => None,
|
||||
Self::Eip4844(TxEip4844 { blob_versioned_hashes, .. }) => {
|
||||
Some(blob_versioned_hashes.to_vec())
|
||||
Some(blob_versioned_hashes.clone())
|
||||
}
|
||||
#[cfg(feature = "optimism")]
|
||||
Self::Deposit(_) => None,
|
||||
|
||||
@ -1577,7 +1577,7 @@ mod tests {
|
||||
provider.set_safe(safe_block.header.clone());
|
||||
provider.set_finalized(finalized_block.header.clone());
|
||||
|
||||
Ok((provider, database_blocks.to_vec(), in_memory_blocks.to_vec(), receipts))
|
||||
Ok((provider, database_blocks.clone(), in_memory_blocks.clone(), receipts))
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
|
||||
Reference in New Issue
Block a user