Skip to content

Commit 841b09a

Browse files
authored
protocols/relay/tests: Remove unused DummyPollParameters (#2172)
1 parent 1e001a2 commit 841b09a

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

protocols/relay/tests/lib.rs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ use libp2p_ping::{Ping, PingConfig, PingEvent};
3535
use libp2p_plaintext::PlainText2Config;
3636
use libp2p_relay::{Relay, RelayConfig};
3737
use libp2p_swarm::protocols_handler::KeepAlive;
38-
use libp2p_swarm::{AddressRecord, DummyBehaviour, NetworkBehaviour, NetworkBehaviourAction, NetworkBehaviourEventProcess, PollParameters, Swarm, SwarmEvent};
39-
use std::iter;
38+
use libp2p_swarm::{DummyBehaviour, NetworkBehaviour, NetworkBehaviourAction, NetworkBehaviourEventProcess, PollParameters, Swarm, SwarmEvent};
4039
use std::task::{Context, Poll};
4140
use std::time::Duration;
4241
use void::Void;
@@ -1329,33 +1328,6 @@ fn build_keep_alive_only_swarm() -> Swarm<DummyBehaviour> {
13291328
Swarm::new(transport, DummyBehaviour::with_keep_alive(KeepAlive::Yes), local_peer_id)
13301329
}
13311330

1332-
struct DummyPollParameters {}
1333-
1334-
impl PollParameters for DummyPollParameters {
1335-
type SupportedProtocolsIter = iter::Empty<Vec<u8>>;
1336-
type ListenedAddressesIter = iter::Empty<Multiaddr>;
1337-
type ExternalAddressesIter = iter::Empty<AddressRecord>;
1338-
1339-
fn supported_protocols(&self) -> Self::SupportedProtocolsIter {
1340-
unimplemented!();
1341-
}
1342-
1343-
/// Returns the list of the addresses we're listening on.
1344-
fn listened_addresses(&self) -> Self::ListenedAddressesIter {
1345-
unimplemented!();
1346-
}
1347-
1348-
/// Returns the list of the addresses nodes can use to reach us.
1349-
fn external_addresses(&self) -> Self::ExternalAddressesIter {
1350-
unimplemented!();
1351-
}
1352-
1353-
/// Returns the peer id of the local node.
1354-
fn local_peer_id(&self) -> &PeerId {
1355-
unimplemented!();
1356-
}
1357-
}
1358-
13591331
fn spawn_swarm_on_pool<B: NetworkBehaviour>(pool: &LocalPool, mut swarm: Swarm<B>) {
13601332
pool.spawner()
13611333
.spawn_obj(

0 commit comments

Comments
 (0)