Remove tokio_xmpp::ParseError and tokio_xmpp::starttls::ParseError
This commit is contained in:
parent
507a3df652
commit
ee3d86ec42
4 changed files with 6 additions and 41 deletions
|
|
@ -3,7 +3,6 @@
|
|||
use hickory_resolver::{error::ResolveError, proto::error::ProtoError};
|
||||
#[cfg(feature = "tls-native")]
|
||||
use native_tls::Error as TlsError;
|
||||
use std::borrow::Cow;
|
||||
use std::error::Error as StdError;
|
||||
use std::fmt;
|
||||
#[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
|
||||
#[derive(Debug)]
|
||||
pub enum ConnectorError {
|
||||
|
|
|
|||
Loading…
Reference in a new issue