Minor refactor for binstalk-downloader (#1365)

- Mv `resolver.rs` => `remote/resolver.rs`
 - Fix clippy warnings in `resolver.rs` on unix

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-09-17 11:06:15 +10:00 committed by GitHub
parent 6560225c03
commit 9c4e3a6642
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -12,7 +12,4 @@ pub mod gh_api_client;
pub mod remote;
#[cfg(feature = "trust-dns")]
mod resolver;
mod utils;

View file

@ -18,9 +18,6 @@ use tracing::{debug, info, instrument};
pub use reqwest::{header, Error as ReqwestError, Method, StatusCode};
pub use url::Url;
#[cfg(feature = "trust-dns")]
use crate::resolver::TrustDnsResolver;
mod delay_request;
use delay_request::DelayRequest;
@ -33,6 +30,11 @@ pub use request_builder::{Body, RequestBuilder, Response};
mod tls_version;
pub use tls_version::TLSVersion;
#[cfg(feature = "trust-dns")]
mod resolver;
#[cfg(feature = "trust-dns")]
use resolver::TrustDnsResolver;
#[cfg(feature = "json")]
pub use request_builder::JsonError;

View file

@ -3,6 +3,7 @@ use std::{net::SocketAddr, sync::Arc};
use hyper::client::connect::dns::Name;
use once_cell::sync::OnceCell;
use reqwest::dns::{Addrs, Resolve};
#[cfg(windows)]
use trust_dns_resolver::config::{NameServerConfig, Protocol, ResolverConfig, ResolverOpts};
use trust_dns_resolver::TokioAsyncResolver;