mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Rust 1.95 lints (#9142)
N/A Adds lints for rust 1.95. Mostly cosmetic. 1. .zip(a.into_iter()) -> .zip(a) . Also a few more places where into_iter is not required 2. replace sort_by with sort_by_key 3. move if statements inside match block. 4. use checked_div instead of if statements. I think this is debatable in terms of being better, happy to remove it if others also feel its unnecessary Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
This commit is contained in:
@@ -289,7 +289,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
for (result, package) in results.into_iter().zip(packages.into_iter()) {
|
||||
for (result, package) in results.into_iter().zip(packages) {
|
||||
let result = match result {
|
||||
Ok((indexed_attestation, attestation)) => Ok(VerifiedUnaggregate {
|
||||
indexed_attestation,
|
||||
@@ -495,7 +495,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
.map(|result| result.map(|verified| verified.into_indexed_attestation()))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
for (result, package) in results.into_iter().zip(packages.into_iter()) {
|
||||
for (result, package) in results.into_iter().zip(packages) {
|
||||
let result = match result {
|
||||
Ok(indexed_attestation) => Ok(VerifiedAggregate {
|
||||
indexed_attestation,
|
||||
|
||||
@@ -1702,8 +1702,8 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
};
|
||||
|
||||
let result = columns_by_range_peers_to_request
|
||||
.iter()
|
||||
.filter_map(|(peer_id, _)| {
|
||||
.keys()
|
||||
.filter_map(|peer_id| {
|
||||
self.send_data_columns_by_range_request(
|
||||
*peer_id,
|
||||
request.clone(),
|
||||
|
||||
Reference in New Issue
Block a user