diff options
author | 2024-11-23 22:39:44 +0000 | |
---|---|---|
committer | 2024-11-23 22:39:44 +0000 | |
commit | 40024d2dadba9e70edb2f3448204565ce3f68ab7 (patch) | |
tree | 3f08b61debf936c513f300c845d8a1cb29edd7c8 /src/connection.rs | |
parent | 9f2546f6dadd916b0e7fc5be51e92d682ef2487b (diff) | |
download | luz-40024d2dadba9e70edb2f3448204565ce3f68ab7.tar.gz luz-40024d2dadba9e70edb2f3448204565ce3f68ab7.tar.bz2 luz-40024d2dadba9e70edb2f3448204565ce3f68ab7.zip |
switch to using peanuts for xml
Diffstat (limited to 'src/connection.rs')
-rw-r--r-- | src/connection.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/connection.rs b/src/connection.rs index b42711e..89f382f 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -8,8 +8,8 @@ use tokio_native_tls::native_tls::TlsConnector; use tokio_native_tls::TlsStream; use tracing::{debug, info, instrument, trace}; +use crate::Error; use crate::Jabber; -use crate::JabberError; use crate::Result; pub type Tls = TlsStream<TcpStream>; @@ -75,7 +75,7 @@ impl Connection { } } } - Err(JabberError::Connection) + Err(Error::Connection) } #[instrument] @@ -154,19 +154,19 @@ impl Connection { pub async fn connect_tls(socket_addr: SocketAddr, domain_name: &str) -> Result<Tls> { let socket = TcpStream::connect(socket_addr) .await - .map_err(|_| JabberError::Connection)?; - let connector = TlsConnector::new().map_err(|_| JabberError::Connection)?; + .map_err(|_| Error::Connection)?; + let connector = TlsConnector::new().map_err(|_| Error::Connection)?; tokio_native_tls::TlsConnector::from(connector) .connect(domain_name, socket) .await - .map_err(|_| JabberError::Connection) + .map_err(|_| Error::Connection) } #[instrument] pub async fn connect_unencrypted(socket_addr: SocketAddr) -> Result<Unencrypted> { TcpStream::connect(socket_addr) .await - .map_err(|_| JabberError::Connection) + .map_err(|_| Error::Connection) } } |