Skip to content

Commit 01ec42e

Browse files
authored
Fix Rust beta compiler errors 1.78.0-beta.1 (#5439)
* remove redundant imports * fix test * contains key * fmt * Merge branch 'unstable' into fix-beta-compiler
1 parent 4449627 commit 01ec42e

File tree

148 files changed

+104
-301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+104
-301
lines changed

beacon_node/beacon_chain/src/beacon_chain.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use crate::{
7272
kzg_utils, metrics, AvailabilityPendingExecutedBlock, BeaconChainError, BeaconForkChoiceStore,
7373
BeaconSnapshot, CachedHead,
7474
};
75-
use eth2::types::{EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes, SyncDuty};
75+
use eth2::types::{EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes};
7676
use execution_layer::{
7777
BlockProposalContents, BlockProposalContentsType, BuilderParams, ChainHealth, ExecutionLayer,
7878
FailedCondition, PayloadAttributes, PayloadStatus,
@@ -120,8 +120,7 @@ use store::{
120120
use task_executor::{ShutdownReason, TaskExecutor};
121121
use tokio_stream::Stream;
122122
use tree_hash::TreeHash;
123-
use types::beacon_state::CloneConfig;
124-
use types::blob_sidecar::{BlobSidecarList, FixedBlobSidecarList};
123+
use types::blob_sidecar::FixedBlobSidecarList;
125124
use types::payload::BlockProductionVersion;
126125
use types::*;
127126

beacon_node/beacon_chain/src/data_availability_checker/overflow_lru_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ mod test {
780780
use store::{HotColdDB, ItemStore, LevelDB, StoreConfig};
781781
use tempfile::{tempdir, TempDir};
782782
use types::non_zero_usize::new_non_zero_usize;
783-
use types::{ChainSpec, ExecPayload, MinimalEthSpec};
783+
use types::{ExecPayload, MinimalEthSpec};
784784

785785
const LOW_VALIDATOR_COUNT: usize = 32;
786786

beacon_node/beacon_chain/src/early_attester_cache.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::{
66
use parking_lot::RwLock;
77
use proto_array::Block as ProtoBlock;
88
use std::sync::Arc;
9-
use types::blob_sidecar::BlobSidecarList;
109
use types::*;
1110

1211
pub struct CacheItem<E: EthSpec> {

beacon_node/beacon_chain/src/eth1_chain.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use ssz_derive::{Decode, Encode};
99
use state_processing::per_block_processing::get_new_eth1_data;
1010
use std::cmp::Ordering;
1111
use std::collections::HashMap;
12-
use std::iter::DoubleEndedIterator;
1312
use std::marker::PhantomData;
1413
use std::time::{SystemTime, UNIX_EPOCH};
1514
use store::{DBColumn, Error as StoreError, StoreItem};
@@ -736,7 +735,7 @@ mod test {
736735
mod eth1_chain_json_backend {
737736
use super::*;
738737
use eth1::DepositLog;
739-
use types::{test_utils::generate_deterministic_keypair, EthSpec, MainnetEthSpec};
738+
use types::{test_utils::generate_deterministic_keypair, MainnetEthSpec};
740739

741740
fn get_eth1_chain() -> Eth1Chain<CachingEth1Backend<E>, E> {
742741
let eth1_config = Eth1Config {

beacon_node/beacon_chain/src/observed_blob_sidecars.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mod tests {
111111
use super::*;
112112
use bls::Hash256;
113113
use std::sync::Arc;
114-
use types::{BlobSidecar, MainnetEthSpec};
114+
use types::MainnetEthSpec;
115115

116116
type E = MainnetEthSpec;
117117

beacon_node/beacon_chain/src/snapshot_cache.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,7 @@ impl<T: EthSpec> SnapshotCache<T> {
367367
mod test {
368368
use super::*;
369369
use crate::test_utils::{BeaconChainHarness, EphemeralHarnessType};
370-
use types::{
371-
test_utils::generate_deterministic_keypair, BeaconBlock, Epoch, MainnetEthSpec,
372-
SignedBeaconBlock, Slot,
373-
};
370+
use types::{test_utils::generate_deterministic_keypair, BeaconBlock, MainnetEthSpec};
374371

375372
fn get_harness() -> BeaconChainHarness<EphemeralHarnessType<MainnetEthSpec>> {
376373
let harness = BeaconChainHarness::builder(MainnetEthSpec)

beacon_node/beacon_chain/src/test_utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ use task_executor::TaskExecutor;
6161
use task_executor::{test_utils::TestRuntime, ShutdownReason};
6262
use tree_hash::TreeHash;
6363
use types::payload::BlockProductionVersion;
64-
use types::sync_selection_proof::SyncSelectionProof;
6564
pub use types::test_utils::generate_deterministic_keypairs;
6665
use types::test_utils::TestRandom;
6766
use types::{typenum::U4294967296, *};

beacon_node/beacon_chain/src/validator_monitor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use state_processing::per_epoch_processing::{
1515
errors::EpochProcessingError, EpochProcessingSummary,
1616
};
1717
use std::collections::{HashMap, HashSet};
18-
use std::convert::TryFrom;
1918
use std::io;
2019
use std::marker::PhantomData;
2120
use std::str::Utf8Error;

beacon_node/beacon_chain/src/validator_pubkey_cache.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use crate::errors::BeaconChainError;
22
use crate::{BeaconChainTypes, BeaconStore};
33
use ssz::{Decode, Encode};
44
use std::collections::HashMap;
5-
use std::convert::TryInto;
65
use std::marker::PhantomData;
76
use store::{DBColumn, Error as StoreError, StoreItem, StoreOp};
87
use types::{BeaconState, Hash256, PublicKey, PublicKeyBytes};
@@ -195,7 +194,7 @@ mod test {
195194
use logging::test_logger;
196195
use std::sync::Arc;
197196
use store::HotColdDB;
198-
use types::{BeaconState, EthSpec, Keypair, MainnetEthSpec};
197+
use types::{EthSpec, Keypair, MainnetEthSpec};
199198

200199
type E = MainnetEthSpec;
201200
type T = EphemeralHarnessType<E>;

beacon_node/beacon_processor/src/work_reprocessing_queue.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,6 @@ impl<S: SlotClock> ReprocessQueue<S> {
964964
mod tests {
965965
use super::*;
966966
use slot_clock::TestingSlotClock;
967-
use types::Slot;
968967

969968
#[test]
970969
fn backfill_processing_schedule_calculation() {

0 commit comments

Comments
 (0)