Skip to content

Commit 210ff25

Browse files
realbigseanmacladson
authored andcommitted
Beta compiler fixes (sigp#5543)
* remove duplicate imports in gossip tests. get rid of duplicate trait bound locations * more double import fixes * cargo fmt
1 parent 969d12d commit 210ff25

File tree

8 files changed

+6
-15
lines changed

8 files changed

+6
-15
lines changed

beacon_node/lighthouse_network/gossipsub/src/behaviour/tests.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,8 @@
2222

2323
use super::*;
2424
use crate::subscription_filter::WhitelistSubscriptionFilter;
25-
use crate::transform::{DataTransform, IdentityTransform};
26-
use crate::types::{RpcOut, RpcReceiver};
27-
use crate::ValidationError;
28-
use crate::{
29-
config::Config, config::ConfigBuilder, types::Rpc, IdentTopic as Topic, TopicScoreParams,
30-
};
25+
use crate::types::RpcReceiver;
26+
use crate::{config::ConfigBuilder, types::Rpc, IdentTopic as Topic};
3127
use byteorder::{BigEndian, ByteOrder};
3228
use libp2p::core::ConnectedPoint;
3329
use rand::Rng;

beacon_node/lighthouse_network/gossipsub/src/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,6 @@ impl std::fmt::Debug for Config {
903903
mod test {
904904
use super::*;
905905
use crate::topic::IdentityHash;
906-
use crate::types::PeerKind;
907906
use crate::Topic;
908907
use libp2p::core::UpgradeInfo;
909908
use std::collections::hash_map::DefaultHasher;

beacon_node/lighthouse_network/gossipsub/src/mcache.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@ impl MessageCache {
221221
#[cfg(test)]
222222
mod tests {
223223
use super::*;
224-
use crate::types::RawMessage;
225-
use crate::{IdentTopic as Topic, TopicHash};
226-
use libp2p::identity::PeerId;
224+
use crate::IdentTopic as Topic;
227225

228226
fn gen_testm(x: u64, topic: TopicHash) -> (MessageId, RawMessage) {
229227
let default_id = |message: &RawMessage| {

beacon_node/lighthouse_network/gossipsub/src/protocol.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ impl Decoder for GossipsubCodec {
508508
mod tests {
509509
use super::*;
510510
use crate::config::Config;
511-
use crate::protocol::{BytesMut, GossipsubCodec, HandlerEvent};
512511
use crate::{Behaviour, ConfigBuilder, MessageAuthenticity};
513512
use crate::{IdentTopic as Topic, Version};
514513
use libp2p::identity::Keypair;

beacon_node/lighthouse_network/gossipsub/src/subscription_filter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ impl TopicSubscriptionFilter for RegexSubscriptionFilter {
212212
mod test {
213213
use super::*;
214214
use crate::types::SubscriptionAction::*;
215-
use std::iter::FromIterator;
216215

217216
#[test]
218217
fn test_filter_incoming_allow_all_with_duplicates() {

beacon_node/operation_pool/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ impl<E: EthSpec> OperationPool<E> {
708708
}
709709

710710
/// Filter up to a maximum number of operations out of an iterator.
711-
fn filter_limit_operations<'a, T: 'a, V: 'a, I, F, G>(
711+
fn filter_limit_operations<'a, T, V: 'a, I, F, G>(
712712
operations: I,
713713
filter: F,
714714
mapping: G,
@@ -718,7 +718,7 @@ where
718718
I: IntoIterator<Item = &'a T>,
719719
F: Fn(&T) -> bool,
720720
G: Fn(&T) -> V,
721-
T: Clone,
721+
T: Clone + 'a,
722722
{
723723
operations
724724
.into_iter()

consensus/types/src/chain_spec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,6 @@ where
16401640
mod tests {
16411641
use super::*;
16421642
use itertools::Itertools;
1643-
use safe_arith::SafeArith;
16441643

16451644
#[test]
16461645
fn test_mainnet_spec_can_be_constructed() {

testing/ef_tests/src/cases/rewards.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use types::{
1818
BeaconState,
1919
};
2020

21+
2122
#[derive(Debug, Clone, PartialEq, Decode, Encode, CompareFields)]
2223
pub struct Deltas {
2324
#[compare_fields(as_slice)]

0 commit comments

Comments
 (0)