Skip to content

Commit

Permalink
chore: Additional cleanup due to deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Nov 25, 2022
1 parent 8f3b5ed commit ec14bb4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ use libp2p::{
GetClosestPeersOk, GetProvidersError, GetProvidersOk, GetRecordError, GetRecordOk,
KademliaConfig, KademliaEvent::*, PutRecordError, PutRecordOk, QueryResult::*, Record,
},
mdns::MdnsEvent,
mdns::Event as MdnsEvent,
ping::Config as PingConfig,
ping::Success as PingSuccess,
swarm::{dial_opts::DialOpts, DialError},
Expand Down Expand Up @@ -816,7 +816,7 @@ impl<Types: IpfsTypes> Ipfs<Types> {
}

/// Add a file through a stream of data
pub async fn get_unixfs(&self, path: IpfsPath) -> Result<BoxStream<'static, Vec<u8>>, Error> {
pub async fn get_unixfs(&self, _: IpfsPath) -> Result<BoxStream<'static, Vec<u8>>, Error> {
anyhow::bail!("Unimplemented")
}

Expand Down
3 changes: 1 addition & 2 deletions src/p2p/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,7 @@ mod tests {
let peer_id = key.public().to_peer_id();
let transport = build_transport(key, None, Default::default()).unwrap();

let swarm = SwarmBuilder::new(transport, SwarmApi::default(), peer_id)
.executor(Box::new(ThreadLocalTokio))
let swarm = SwarmBuilder::with_executor(transport, SwarmApi::default(), peer_id, ThreadLocalTokio)
.build();
(peer_id, swarm)
}
Expand Down
2 changes: 1 addition & 1 deletion src/p2p/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use libp2p::identity;
use libp2p::mplex::MplexConfig;
use libp2p::noise::{self, NoiseConfig};
use libp2p::relay::v2::client::transport::ClientTransport;
use libp2p::tcp::{GenTcpConfig, TokioTcpTransport};
use libp2p::tcp::{Config as GenTcpConfig, tokio::Transport as TokioTcpTransport};
use libp2p::yamux::YamuxConfig;
use libp2p::{PeerId, Transport};
use std::io::{self, Error, ErrorKind};
Expand Down

0 comments on commit ec14bb4

Please sign in to comment.