Skip to content

Commit b88a4ee

Browse files
Fix compilation when dns-resolver is disabled (#1292)
1 parent 8d13fb2 commit b88a4ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/srv.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pub(crate) struct LookupHosts {
2020
}
2121

2222
impl LookupHosts {
23+
#[cfg(feature = "dns-resolver")]
2324
pub(crate) fn validate(mut self, original_hostname: &str, dm: DomainMismatch) -> Result<Self> {
2425
let original_hostname_parts: Vec<_> = original_hostname.split('.').collect();
2526
let original_domain_name = if original_hostname_parts.len() >= 3 {
@@ -261,7 +262,10 @@ pub(crate) struct SrvResolver {}
261262

262263
#[cfg(not(feature = "dns-resolver"))]
263264
impl SrvResolver {
264-
pub(crate) async fn new(_config: Option<ResolverConfig>) -> Result<Self> {
265+
pub(crate) async fn new(
266+
_config: Option<ResolverConfig>,
267+
_srv_service_name: Option<String>,
268+
) -> Result<Self> {
265269
Ok(Self {})
266270
}
267271

0 commit comments

Comments
 (0)