Compare commits

...

1 commit

Author SHA1 Message Date
e7aee18466
tokio-xmpp: Update hickory-dns dep (previously trust-dns)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-10-25 13:30:53 +02:00
3 changed files with 3 additions and 5 deletions

View file

@ -23,8 +23,7 @@ tokio-native-tls = { version = "0.3", optional = true }
tokio-rustls = { version = "0.24", optional = true }
tokio-stream = { version = "0.1", features = [] }
tokio-util = { version = "0.7", features = ["codec"] }
trust-dns-proto = "0.22"
trust-dns-resolver = "0.22"
hickory-resolver = "0.24"
xmpp-parsers = "0.20"
minidom = "0.15"
rxml = "0.9.1"

View file

@ -1,3 +1,4 @@
use hickory_resolver::{error::ResolveError, proto::error::ProtoError};
#[cfg(feature = "tls-native")]
use native_tls::Error as TlsError;
use sasl::client::MechanismError as SaslMechanismError;
@ -10,8 +11,6 @@ use std::str::Utf8Error;
use tokio_rustls::rustls::client::InvalidDnsNameError;
#[cfg(all(feature = "tls-rust", not(feature = "tls-native")))]
use tokio_rustls::rustls::Error as TlsError;
use trust_dns_proto::error::ProtoError;
use trust_dns_resolver::error::ResolveError;
use xmpp_parsers::sasl::DefinedCondition as SaslDefinedCondition;
use xmpp_parsers::{Error as ParsersError, JidParseError};

View file

@ -1,9 +1,9 @@
use crate::{ConnecterError, Error};
use hickory_resolver::{IntoName, TokioAsyncResolver};
use idna;
use log::debug;
use std::net::SocketAddr;
use tokio::net::TcpStream;
use trust_dns_resolver::{IntoName, TokioAsyncResolver};
pub async fn connect_to_host(domain: &str, port: u16) -> Result<TcpStream, Error> {
let ascii_domain = idna::domain_to_ascii(&domain).map_err(|_| Error::Idna)?;