Skip to content

Commit

Permalink
examples: update file-sharing example to libp2p-swarm
Browse files Browse the repository at this point in the history
 ListenUpgradeError and DialUpgradeError updates.
  • Loading branch information
jxs committed Jan 6, 2023
1 parent 4a0e5ee commit 021502c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/file-sharing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ mod network {
use libp2p::kad::{GetProvidersOk, Kademlia, KademliaEvent, QueryId, QueryResult};
use libp2p::multiaddr::Protocol;
use libp2p::request_response::{self, ProtocolSupport, RequestId, ResponseChannel};
use libp2p::swarm::{ConnectionHandlerUpgrErr, NetworkBehaviour, Swarm, SwarmEvent};
use libp2p::swarm::{NetworkBehaviour, Swarm, SwarmEvent};
use libp2p_core::UpgradeError;
use std::collections::{hash_map, HashMap, HashSet};
use std::iter;

Expand Down Expand Up @@ -403,10 +404,7 @@ mod network {

async fn handle_event(
&mut self,
event: SwarmEvent<
ComposedEvent,
EitherError<ConnectionHandlerUpgrErr<io::Error>, io::Error>,
>,
event: SwarmEvent<ComposedEvent, EitherError<UpgradeError<io::Error>, io::Error>>,
) {
match event {
SwarmEvent::Behaviour(ComposedEvent::Kademlia(
Expand Down

0 comments on commit 021502c

Please sign in to comment.