Skip to content

Commit

Permalink
Merge pull request #2 from umgefahren/dependabot/cargo/libp2p-0.50
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Nov 25, 2022
2 parents 9fcd7f3 + e64234d commit dac835e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ authors = ["umgefahren <[email protected]>"]
arti-client = { version = "0.7", default-features = false }
async-std-crate = { package = "async-std", version = "1", optional = true, default-features = false }
futures = "0.3"
libp2p-core = { version = "0.37" }
libp2p-core = { version = "0.38" }
thiserror = "1"
tokio-crate = { package = "tokio", version = "1", optional = true, default-features = false }
tor-rtcompat = "0.7"

[dev-dependencies]
libp2p = { version = "0.49", features = ["mplex", "noise", "ping", "yamux"] }
libp2p = { version = "0.50", features = ["mplex", "noise", "ping", "yamux", "macros", "async-std"] }
tokio-crate = { package = "tokio", version = "1", features = ["rt", "macros"] }
async-std-crate = { package = "async-std", version = "1", features = ["attributes"] }

Expand Down
9 changes: 3 additions & 6 deletions examples/ping-onion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@

use async_std_crate as async_std;
use futures::prelude::*;
use libp2p::swarm::{keep_alive, Swarm, SwarmEvent};
use libp2p::{
core::upgrade, identity, mplex, noise, ping, yamux, Multiaddr, NetworkBehaviour, PeerId,
Transport,
};
use libp2p::swarm::{keep_alive, NetworkBehaviour, Swarm, SwarmEvent};
use libp2p::{core::upgrade, identity, mplex, noise, ping, yamux, Multiaddr, PeerId, Transport};
use libp2p_community_tor::{AddressConversion, AsyncStdRustlsTorTransport};
use std::error::Error;

Expand Down Expand Up @@ -87,7 +84,7 @@ async fn main() -> Result<(), Box<dyn Error>> {

let transport = onion_transport(local_key).await?;

let mut swarm = Swarm::new(transport, Behaviour::default(), local_peer_id);
let mut swarm = Swarm::with_async_std_executor(transport, Behaviour::default(), local_peer_id);

// Dial the peer identified by the multi-address given as the second
// command-line argument, if any.
Expand Down
4 changes: 2 additions & 2 deletions src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ pub fn safe_extract_tor_address(multiaddr: &Multiaddr) -> Option<TorAddr> {
Some(tor_addr)
}

fn try_to_domain_and_port<'a, 'b>(
fn try_to_domain_and_port<'a>(
maybe_domain: &'a Protocol,
maybe_port: &'b Protocol,
maybe_port: &Protocol,
) -> Option<(&'a str, u16)> {
match (maybe_domain, maybe_port) {
(
Expand Down

0 comments on commit dac835e

Please sign in to comment.