@@ -35,8 +35,7 @@ use libp2p_ping::{Ping, PingConfig, PingEvent};
3535use libp2p_plaintext:: PlainText2Config ;
3636use libp2p_relay:: { Relay , RelayConfig } ;
3737use 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 } ;
4039use std:: task:: { Context , Poll } ;
4140use std:: time:: Duration ;
4241use 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-
13591331fn spawn_swarm_on_pool < B : NetworkBehaviour > ( pool : & LocalPool , mut swarm : Swarm < B > ) {
13601332 pool. spawner ( )
13611333 . spawn_obj (
0 commit comments