rename Incompatile error kind to TlsIncompatible

This commit is contained in:
Sean McArthur
2019-01-04 14:46:58 -08:00
parent ad854c3ee8
commit 11d7812e88
2 changed files with 7 additions and 7 deletions

View File

@@ -138,7 +138,7 @@ impl ClientBuilder {
tls_inner::Identity::Pkcs12(buf, passwd) =>
try_!(::native_tls::Identity::from_pkcs12(&buf, &passwd)),
#[cfg(feature = "rustls-tls")]
_ => return Err(::error::from(::error::Kind::Incompatible))
_ => return Err(::error::from(::error::Kind::TlsIncompatible))
};
tls.identity(id);
}
@@ -195,7 +195,7 @@ impl ClientBuilder {
}
},
#[cfg(feature = "default-tls")]
_ => return Err(::error::from(::error::Kind::Incompatible))
_ => return Err(::error::from(::error::Kind::TlsIncompatible))
};
tls.set_single_client_cert(certs, key);
}

View File

@@ -135,7 +135,7 @@ impl Error {
Kind::Mime(ref e) => Some(e),
Kind::Url(ref e) => Some(e),
#[cfg(all(feature = "default-tls", feature = "rustls-tls"))]
Kind::Incompatible => None,
Kind::TlsIncompatible => None,
#[cfg(feature = "default-tls")]
Kind::NativeTls(ref e) => Some(e),
#[cfg(feature = "rustls-tls")]
@@ -232,7 +232,7 @@ impl fmt::Display for Error {
Kind::Url(ref e) => fmt::Display::fmt(e, f),
Kind::UrlBadScheme => f.write_str("URL scheme is not allowed"),
#[cfg(all(feature = "default-tls", feature = "rustls-tls"))]
Kind::Incompatible => f.write_str("Incompatible identity type"),
Kind::TlsIncompatible => f.write_str("Incompatible TLS identity type"),
#[cfg(feature = "default-tls")]
Kind::NativeTls(ref e) => fmt::Display::fmt(e, f),
#[cfg(feature = "rustls-tls")]
@@ -263,7 +263,7 @@ impl StdError for Error {
Kind::Url(ref e) => e.description(),
Kind::UrlBadScheme => "URL scheme is not allowed",
#[cfg(all(feature = "default-tls", feature = "rustls-tls"))]
Kind::Incompatible => "Incompatible identity type",
Kind::TlsIncompatible => "Incompatible TLS identity type",
#[cfg(feature = "default-tls")]
Kind::NativeTls(ref e) => e.description(),
#[cfg(feature = "rustls-tls")]
@@ -286,7 +286,7 @@ impl StdError for Error {
Kind::Mime(ref e) => e.cause(),
Kind::Url(ref e) => e.cause(),
#[cfg(all(feature = "default-tls", feature = "rustls-tls"))]
Kind::Incompatible => None,
Kind::TlsIncompatible => None,
#[cfg(feature = "default-tls")]
Kind::NativeTls(ref e) => e.cause(),
#[cfg(feature = "rustls-tls")]
@@ -311,7 +311,7 @@ pub(crate) enum Kind {
Url(::url::ParseError),
UrlBadScheme,
#[cfg(all(feature = "default-tls", feature = "rustls-tls"))]
Incompatible,
TlsIncompatible,
#[cfg(feature = "default-tls")]
NativeTls(::native_tls::Error),
#[cfg(feature = "rustls-tls")]