Remove tokio_xmpp::ParseError and tokio_xmpp::starttls::ParseError

This commit is contained in:
xmppftw 2024-07-31 19:25:09 +02:00 committed by Link Mauve
parent 507a3df652
commit ee3d86ec42
4 changed files with 6 additions and 41 deletions

View file

@ -1,3 +1,8 @@
Version NEXT:
XXXX-YY-ZZ RELEASER <admin@example.com>
* Breaking:
- Remove `tokio_xmpp::ParseError` and `tokio_xmpp::starttls::ParseError` which were never used
Version 4.0.0: Version 4.0.0:
2024-07-26 Maxime “pep” Buquet <pep@bouah.net> 2024-07-26 Maxime “pep” Buquet <pep@bouah.net>
* Breaking: * Breaking:

View file

@ -1,5 +1,4 @@
use sasl::client::MechanismError as SaslMechanismError; use sasl::client::MechanismError as SaslMechanismError;
use std::borrow::Cow;
use std::error::Error as StdError; use std::error::Error as StdError;
use std::fmt; use std::fmt;
use std::io::Error as IoError; use std::io::Error as IoError;
@ -93,25 +92,6 @@ impl From<Utf8Error> for Error {
} }
} }
/// XML parse error wrapper type
#[derive(Debug)]
pub struct ParseError(pub Cow<'static, str>);
impl StdError for ParseError {
fn description(&self) -> &str {
self.0.as_ref()
}
fn cause(&self) -> Option<&dyn StdError> {
None
}
}
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.0)
}
}
/// XMPP protocol-level error /// XMPP protocol-level error
#[derive(Debug)] #[derive(Debug)]
pub enum ProtocolError { pub enum ProtocolError {

View file

@ -40,7 +40,7 @@ pub use client::{
mod component; mod component;
pub use crate::component::Component; pub use crate::component::Component;
mod error; mod error;
pub use crate::error::{AuthError, Error, ParseError, ProtocolError}; pub use crate::error::{AuthError, Error, ProtocolError};
// Re-exports // Re-exports
pub use minidom; pub use minidom;

View file

@ -3,7 +3,6 @@
use hickory_resolver::{error::ResolveError, proto::error::ProtoError}; use hickory_resolver::{error::ResolveError, proto::error::ProtoError};
#[cfg(feature = "tls-native")] #[cfg(feature = "tls-native")]
use native_tls::Error as TlsError; use native_tls::Error as TlsError;
use std::borrow::Cow;
use std::error::Error as StdError; use std::error::Error as StdError;
use std::fmt; use std::fmt;
#[cfg(all(feature = "tls-rust", not(feature = "tls-native")))] #[cfg(all(feature = "tls-rust", not(feature = "tls-native")))]
@ -68,25 +67,6 @@ impl From<InvalidDnsNameError> for Error {
} }
} }
/// XML parse error wrapper type
#[derive(Debug)]
pub struct ParseError(pub Cow<'static, str>);
impl StdError for ParseError {
fn description(&self) -> &str {
self.0.as_ref()
}
fn cause(&self) -> Option<&dyn StdError> {
None
}
}
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.0)
}
}
/// Error establishing connection /// Error establishing connection
#[derive(Debug)] #[derive(Debug)]
pub enum ConnectorError { pub enum ConnectorError {