chore: update dependencies with breaking changes (#4555)

This commit is contained in:
DaniPopes
2023-09-11 16:53:09 +02:00
committed by GitHub
parent 7dd14a7eba
commit 28f5118048
19 changed files with 208 additions and 210 deletions

View File

@ -23,7 +23,7 @@ tokio = { workspace = true, features = ["io-util", "net", "time"] }
tokio-stream.workspace = true
# trust-dns
trust-dns-resolver = "0.22"
trust-dns-resolver = "0.23"
# misc
data-encoding = "2"
@ -34,7 +34,7 @@ thiserror.workspace = true
tracing.workspace = true
parking_lot.workspace = true
serde = { workspace = true, optional = true }
serde_with = { version = "2.1.0", optional = true }
serde_with = { version = "3.3.0", optional = true }
[dev-dependencies]
tokio = { workspace = true, features = ["sync", "rt", "rt-multi-thread"] }

View File

@ -5,7 +5,7 @@ use parking_lot::RwLock;
use std::collections::HashMap;
use tracing::trace;
pub use trust_dns_resolver::{error::ResolveError, TokioAsyncResolver};
use trust_dns_resolver::{proto::DnsHandle, AsyncResolver, ConnectionProvider};
use trust_dns_resolver::{name_server::ConnectionProvider, AsyncResolver};
/// A type that can lookup DNS entries
#[async_trait]
@ -15,11 +15,7 @@ pub trait Resolver: Send + Sync + Unpin + 'static {
}
#[async_trait]
impl<C, P> Resolver for AsyncResolver<C, P>
where
C: DnsHandle<Error = ResolveError>,
P: ConnectionProvider<Conn = C>,
{
impl<P: ConnectionProvider> Resolver for AsyncResolver<P> {
async fn lookup_txt(&self, query: &str) -> Option<String> {
// See: [AsyncResolver::txt_lookup]
// > *hint* queries that end with a '.' are fully qualified names and are cheaper lookups