diff --git a/Cargo.toml b/Cargo.toml index 5772a280d..756fe6298 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -156,6 +156,8 @@ use_self = "warn" missing_const_for_fn = "warn" empty_line_after_doc_comments = "warn" iter_on_single_items = "warn" +unnecessary_struct_initialization = "warn" +string_lit_as_bytes = "warn" # These are nursery lints which have findings. Allow them for now. Some are not # quite mature enough for use in our codebase and some we don't really want. @@ -171,9 +173,7 @@ non_send_fields_in_send_ty = "allow" redundant_pub_crate = "allow" significant_drop_in_scrutinee = "allow" significant_drop_tightening = "allow" -string_lit_as_bytes = "allow" type_repetition_in_bounds = "allow" -unnecessary_struct_initialization = "allow" [workspace.package] version = "0.2.0-beta.7" diff --git a/crates/net/network/src/discovery.rs b/crates/net/network/src/discovery.rs index 8d268765e..679a1cedb 100644 --- a/crates/net/network/src/discovery.rs +++ b/crates/net/network/src/discovery.rs @@ -148,7 +148,7 @@ impl Discovery { pub(crate) fn update_fork_id(&self, fork_id: ForkId) { if let Some(discv4) = &self.discv4 { // use forward-compatible forkid entry - discv4.set_eip868_rlp("eth".as_bytes().to_vec(), EnrForkIdEntry::from(fork_id)) + discv4.set_eip868_rlp(b"eth".to_vec(), EnrForkIdEntry::from(fork_id)) } // todo: update discv5 enr } diff --git a/crates/rpc/rpc/src/eth/api/server.rs b/crates/rpc/rpc/src/eth/api/server.rs index 9ca8a57b2..02a108f5f 100644 --- a/crates/rpc/rpc/src/eth/api/server.rs +++ b/crates/rpc/rpc/src/eth/api/server.rs @@ -533,9 +533,7 @@ mod tests { transactions.push(transaction); } else { let transaction = TransactionSigned { - transaction: reth_primitives::Transaction::Legacy( - reth_primitives::TxLegacy { ..Default::default() }, - ), + transaction: reth_primitives::Transaction::Legacy(Default::default()), ..Default::default() };