From 423adca0bf4a85e3a425e26c6549a395aed4f5fc Mon Sep 17 00:00:00 2001 From: Elena Frank Date: Wed, 29 Jun 2022 06:37:57 +0200 Subject: [PATCH] protocols/identify: Fix dev deps for example (#2737) --- protocols/identify/Cargo.toml | 14 +++++++++----- protocols/identify/src/identify.rs | 6 +++--- protocols/identify/src/protocol.rs | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 2b5235325cc..7136caa4f17 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -25,12 +25,16 @@ thiserror = "1.0" void = "1.0" [dev-dependencies] -async-std = "1.6.2" +async-std = { version = "1.6.2", features = ["attributes"] } env_logger = "0.9" -libp2p = { path = "../..", default-features = false, features = ["identify", "tcp-async-io"] } -libp2p-mplex = { path = "../../muxers/mplex" } -libp2p-noise = { path = "../../transports/noise" } -libp2p-tcp = { path = "../../transports/tcp" } +libp2p = { path = "../..", default-features = false, features = [ + "dns-async-std", + "mplex", + "noise", + "tcp-async-io", + "websocket", + "yamux", +]} [build-dependencies] prost-build = "0.10" diff --git a/protocols/identify/src/identify.rs b/protocols/identify/src/identify.rs index f2d5ffd641d..5e82b8e43e6 100644 --- a/protocols/identify/src/identify.rs +++ b/protocols/identify/src/identify.rs @@ -513,11 +513,11 @@ fn multiaddr_matches_peer_id(addr: &Multiaddr, peer_id: &PeerId) -> bool { mod tests { use super::*; use futures::pin_mut; + use libp2p::mplex::MplexConfig; + use libp2p::noise; + use libp2p::tcp::TcpConfig; use libp2p_core::{identity, muxing::StreamMuxerBox, transport, upgrade, PeerId, Transport}; - use libp2p_mplex::MplexConfig; - use libp2p_noise as noise; use libp2p_swarm::{Swarm, SwarmEvent}; - use libp2p_tcp::TcpConfig; fn transport() -> ( identity::PublicKey, diff --git a/protocols/identify/src/protocol.rs b/protocols/identify/src/protocol.rs index 0fd50460e2d..11a33f652a3 100644 --- a/protocols/identify/src/protocol.rs +++ b/protocols/identify/src/protocol.rs @@ -287,12 +287,12 @@ pub enum UpgradeError { mod tests { use super::*; use futures::channel::oneshot; + use libp2p::tcp::TcpConfig; use libp2p_core::{ identity, upgrade::{self, apply_inbound, apply_outbound}, Transport, }; - use libp2p_tcp::TcpConfig; #[test] fn correct_transfer() {