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:
whtsht
2023-09-24 14:31:42 +09:00
committed by GitHub
parent b4d9e5294b
commit 95890b550b
11 changed files with 154 additions and 127 deletions

View File

@ -405,7 +405,7 @@ async fn swarm<B: NetworkBehaviour + Default>() -> Result<Swarm<B>> {
libp2p_quic::tokio::Transport::new(config)
};
let dns = libp2p_dns::TokioDnsConfig::system(OrTransport::new(quic, tcp))?;
let dns = libp2p_dns::tokio::Transport::system(OrTransport::new(quic, tcp))?;
dns.map(|either_output, _| match either_output {
Either::Left((peer_id, muxer)) => (peer_id, StreamMuxerBox::new(muxer)),