diff --git a/Cargo.lock b/Cargo.lock index 7efc7b73..7deb292d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -161,7 +161,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "synstructure", + "synstructure 0.12.6", ] [[package]] @@ -587,7 +587,7 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.90", @@ -765,6 +765,7 @@ dependencies = [ "futures", "governor", "hex", + "hickory-resolver", "http-body", "hyper", "indexmap 2.1.0", @@ -799,7 +800,6 @@ dependencies = [ "tracing-opentelemetry", "tracing-subscriber", "tripwire", - "trust-dns-resolver", "uhlc", "uuid", ] @@ -851,6 +851,7 @@ dependencies = [ "bytes", "corro-api-types", "futures", + "hickory-resolver", "http", "hyper", "pin-project-lite", @@ -861,7 +862,6 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "trust-dns-resolver", "uuid", ] @@ -1431,14 +1431,14 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.90", ] [[package]] @@ -1571,9 +1571,9 @@ dependencies = [ [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1844,6 +1844,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1865,6 +1871,51 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hickory-proto" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447afdcdb8afb9d0a852af6dc65d9b285ce720ed7a59e42a8bf2e931c67bc1b5" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2e2aba9c389ce5267d31cf1e4dace82390ae276b0b364ea55630b1fa1b44b4" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "hmac" version = "0.12.1" @@ -2006,6 +2057,124 @@ dependencies = [ "cxx-build", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2014,23 +2183,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "idna" -version = "0.3.0" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -2272,6 +2441,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.11" @@ -2347,12 +2522,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.0" @@ -2833,9 +3002,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pgwire" @@ -3735,9 +3904,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ "serde", ] @@ -3887,6 +4056,12 @@ dependencies = [ "log", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3925,7 +4100,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -4006,6 +4181,17 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "tempfile" version = "3.5.0" @@ -4141,6 +4327,16 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -4508,51 +4704,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "trust-dns-proto" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "rand", - "smallvec", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lazy_static", - "lru-cache", - "parking_lot", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "tracing", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.4" @@ -4659,12 +4810,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 0.3.0", + "idna", "percent-encoding", ] @@ -4680,6 +4831,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.1" @@ -5108,6 +5271,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "x509-certificate" version = "0.21.0" @@ -5159,6 +5334,30 @@ dependencies = [ "time", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure 0.13.1", +] + [[package]] name = "zerocopy" version = "0.7.26" @@ -5179,12 +5378,55 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure 0.13.1", +] + [[package]] name = "zeroize" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "zstd" version = "0.13.0" diff --git a/Cargo.toml b/Cargo.toml index 3b5e7725..62e365f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,7 +77,7 @@ tracing = "0.1.37" tracing-filter = { version = "0.1.0-alpha.2", features = ["smallvec"] } tracing-opentelemetry = { version = "0.21.0", default-features = false, features = ["tracing-log"]} tracing-subscriber = { version = "0.3.16", features = ["json", "env-filter"] } -trust-dns-resolver = "0.22.0" +hickory-resolver = "0.24" uhlc = { version = "0.7", features = ["defmt"] } uuid = { version = "1.3.1", features = ["v4", "serde"] } webpki = { version = "0.22.0", features = ["std"] } diff --git a/crates/corro-agent/Cargo.toml b/crates/corro-agent/Cargo.toml index 38f2134e..bc5092de 100644 --- a/crates/corro-agent/Cargo.toml +++ b/crates/corro-agent/Cargo.toml @@ -17,6 +17,7 @@ eyre = { workspace = true } foca = { workspace = true } futures = { workspace = true } hex = { workspace = true } +hickory-resolver = { workspace = true } hyper = { workspace = true } itertools = { workspace = true } metrics = { workspace = true } @@ -50,7 +51,6 @@ tracing = { workspace = true } tracing-opentelemetry = { workspace = true } tracing-subscriber = { workspace = true } tripwire = { path = "../tripwire" } -trust-dns-resolver = { workspace = true } uhlc = { workspace = true } uuid = { workspace = true } corro-pg = { path = "../corro-pg" } diff --git a/crates/corro-agent/src/agent/bootstrap.rs b/crates/corro-agent/src/agent/bootstrap.rs index 049dda5b..f3a14fc4 100644 --- a/crates/corro-agent/src/agent/bootstrap.rs +++ b/crates/corro-agent/src/agent/bootstrap.rs @@ -1,14 +1,14 @@ use crate::agent::RANDOM_NODES_CHOICES; use corro_types::{agent::SplitPool, config::DEFAULT_GOSSIP_PORT}; +use hickory_resolver::{ + error::ResolveErrorKind, + proto::rr::{RData, RecordType}, +}; use rand::{rngs::StdRng, seq::IteratorRandom, SeedableRng}; use std::{collections::HashSet, net::SocketAddr}; use tokio::task::block_in_place; use tracing::{debug, error, warn}; -use trust_dns_resolver::{ - error::ResolveErrorKind, - proto::rr::{RData, RecordType}, -}; /// Apply the user-provided set of bootstrap nodes pub async fn generate_bootstrap( @@ -59,8 +59,8 @@ async fn resolve_bootstrap( bootstrap: &[String], our_addr: SocketAddr, ) -> eyre::Result> { - use trust_dns_resolver::config::{NameServerConfigGroup, ResolverConfig, ResolverOpts}; - use trust_dns_resolver::{AsyncResolver, TokioAsyncResolver}; + use hickory_resolver::config::{NameServerConfigGroup, ResolverConfig, ResolverOpts}; + use hickory_resolver::{AsyncResolver, TokioAsyncResolver}; let mut addrs = HashSet::new(); @@ -92,7 +92,7 @@ async fn resolve_bootstrap( NameServerConfigGroup::from_ips_clear(&[ip], port, true), ), ResolverOpts::default(), - )?); + )); debug!("using resolver: {dns_server}"); } if let Some(hostname) = host_port.next() { @@ -117,8 +117,8 @@ async fn resolve_bootstrap( .and_then(|p| p.parse().ok()) .unwrap_or(DEFAULT_GOSSIP_PORT); for addr in response.iter().filter_map(|rdata| match rdata { - RData::A(ip) => Some(SocketAddr::from((*ip, port))), - RData::AAAA(ip) => Some(SocketAddr::from((*ip, port))), + RData::A(ip) => Some(SocketAddr::from((ip.0, port))), + RData::AAAA(ip) => Some(SocketAddr::from((ip.0, port))), _ => None, }) { match (our_addr, addr) { diff --git a/crates/corro-client/Cargo.toml b/crates/corro-client/Cargo.toml index 9e8a328c..b16e6bb0 100644 --- a/crates/corro-client/Cargo.toml +++ b/crates/corro-client/Cargo.toml @@ -11,6 +11,7 @@ license = "MIT" bytes = { workspace = true } corro-api-types = { version = "0.1.0-alpha.1", path = "../corro-api-types" } futures = { workspace = true } +hickory-resolver = { workspace = true } http = { workspace = true } hyper = { workspace = true } pin-project-lite = { workspace = true } @@ -22,6 +23,5 @@ tracing = { workspace = true } uuid = { workspace = true } sqlite-pool = { path = "../sqlite-pool" } serde = { workspace = true } -trust-dns-resolver = { workspace = true } [features] diff --git a/crates/corro-client/src/lib.rs b/crates/corro-client/src/lib.rs index 9c4e17cd..85e1497e 100644 --- a/crates/corro-client/src/lib.rs +++ b/crates/corro-client/src/lib.rs @@ -1,6 +1,11 @@ pub mod sub; use corro_api_types::{ChangeId, ExecResponse, ExecResult, SqliteValue, Statement}; +use hickory_resolver::{ + error::{ResolveError, ResolveErrorKind}, + name_server::TokioConnectionProvider, + AsyncResolver, +}; use http::uri::PathAndQuery; use hyper::{client::HttpConnector, http::HeaderName, Body, StatusCode}; use serde::de::DeserializeOwned; @@ -17,11 +22,6 @@ use tokio::{ time::timeout, }; use tracing::{debug, info, warn}; -use trust_dns_resolver::{ - error::{ResolveError, ResolveErrorKind}, - name_server::{GenericConnection, GenericConnectionProvider, TokioRuntime}, - AsyncResolver, -}; use uuid::Uuid; const HTTP2_CONNECT_TIMEOUT: Duration = Duration::from_secs(3); @@ -436,7 +436,7 @@ impl CorrosionPooledClient { pub fn new( addrs: Vec, stickiness_timeout: time::Duration, - resolver: AsyncResolver>, + resolver: AsyncResolver, ) -> Self { Self { inner: Arc::new(RwLock::new(PooledClientInner { @@ -592,7 +592,7 @@ impl CorrosionPooledClient { struct AddrPicker { // Resolver used to resolve the addresses - resolver: AsyncResolver>, + resolver: AsyncResolver, // List of addresses/hostname to try in order addrs: Vec, // Next address/hostname to try @@ -605,10 +605,7 @@ struct AddrPicker { } impl AddrPicker { - fn new( - addrs: Vec, - resolver: AsyncResolver>, - ) -> AddrPicker { + fn new(addrs: Vec, resolver: AsyncResolver) -> AddrPicker { Self { resolver, addrs, @@ -709,6 +706,7 @@ pub enum Error { mod tests { use crate::{CorrosionPooledClient, Error}; use corro_api_types::SqliteValue; + use hickory_resolver::AsyncResolver; use hyper::{header::HeaderValue, service::service_fn, Body, Request, Response}; use std::{ convert::Infallible, @@ -720,7 +718,6 @@ mod tests { time::Duration, }; use tokio::{net::TcpListener, pin, sync::broadcast}; - use trust_dns_resolver::AsyncResolver; use uuid::Uuid; struct Server {