mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-26 08:11:39 +00:00
refactor(dns): unify symbol naming
Renamed the following - `dns::GenDnsConfig` -> `dns::Config` - `dns::DnsConfig` -> `dns::async_std::Config` - `dns::TokioDnsConfig` -> `dns::tokio::Config` If async-std feature is enable, use `dns::async_std::Config`. When using tokio, import `dns::tokio::Config` . There is no need to use `dns::Config` directly. Resolves #4486. Related: #2217. Pull-Request: #4505.
This commit is contained in:
@ -33,9 +33,7 @@ use libp2p::{
|
||||
transport::Transport,
|
||||
upgrade,
|
||||
},
|
||||
dcutr,
|
||||
dns::DnsConfig,
|
||||
identify, identity, noise, ping, quic, relay,
|
||||
dcutr, dns, identify, identity, noise, ping, quic, relay,
|
||||
swarm::{NetworkBehaviour, SwarmBuilder, SwarmEvent},
|
||||
tcp, yamux, PeerId,
|
||||
};
|
||||
@ -102,7 +100,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
&local_key,
|
||||
)));
|
||||
|
||||
block_on(DnsConfig::system(relay_tcp_quic_transport))
|
||||
block_on(dns::async_std::Transport::system(relay_tcp_quic_transport))
|
||||
.unwrap()
|
||||
.map(|either_output, _| match either_output {
|
||||
Either::Left((peer_id, muxer)) => (peer_id, StreamMuxerBox::new(muxer)),
|
||||
|
Reference in New Issue
Block a user