@@ -35,7 +35,7 @@ use libp2p_request_response::{
35
35
ProtocolSupport , RequestId , RequestResponse , RequestResponseConfig , RequestResponseEvent ,
36
36
RequestResponseMessage , ResponseChannel ,
37
37
} ;
38
- use libp2p_swarm:: behaviour:: THandlerInEvent ;
38
+ use libp2p_swarm:: behaviour:: { ConnectionDenied , THandlerInEvent } ;
39
39
use libp2p_swarm:: {
40
40
behaviour:: {
41
41
AddressChange , ConnectionClosed , ConnectionEstablished , DialFailure , ExpiredExternalAddr ,
@@ -50,7 +50,6 @@ use std::{
50
50
task:: { Context , Poll } ,
51
51
time:: Duration ,
52
52
} ;
53
- use void:: Void ;
54
53
55
54
/// Config for the [`Behaviour`].
56
55
#[ derive( Debug , Clone , PartialEq , Eq ) ]
@@ -411,7 +410,6 @@ impl Behaviour {
411
410
412
411
impl NetworkBehaviour for Behaviour {
413
412
type ConnectionHandler = <RequestResponse < AutoNatCodec > as NetworkBehaviour >:: ConnectionHandler ;
414
- type ConnectionDenied = Void ;
415
413
type OutEvent = Event ;
416
414
417
415
fn poll ( & mut self , cx : & mut Context < ' _ > , params : & mut impl PollParameters ) -> Poll < Action > {
@@ -463,7 +461,7 @@ impl NetworkBehaviour for Behaviour {
463
461
& mut self ,
464
462
peer : & PeerId ,
465
463
connected_point : & ConnectedPoint ,
466
- ) -> Result < Self :: ConnectionHandler , Self :: ConnectionDenied > {
464
+ ) -> Result < Self :: ConnectionHandler , ConnectionDenied > {
467
465
self . inner . new_handler ( peer, connected_point)
468
466
}
469
467
0 commit comments