Provide encapsulated Tls error information

When `.to_string()` is invoked on a the crate-wide Error enum,
the error message using #[error("...")] is displayed.
Some of those wrapped internal enums also contain, possibly more
helpful, error messages.  This will include the string gathered by
`.to_string()` from the encapsulated enum in the main error message.

See also
https://github.com/squidowl/halloy/pull/143
This commit is contained in:
Janis König 2023-07-11 15:19:27 +02:00
parent 26ab9425bd
commit 5658fe514f

View file

@ -31,7 +31,7 @@ pub enum Error {
/// An internal TLS error.
#[cfg(all(feature = "tls-native", not(feature = "tls-rust")))]
#[error("a TLS error occurred")]
#[error("a TLS error occurred: {0}")]
Tls(
#[source]
#[from]