Mark error cause as such

See failure crate documentation.
This commit is contained in:
Alexander Krotov
2019-11-29 21:10:09 +01:00
committed by Floris Bruynooghe
parent 14287b12ae
commit ac4108b05b

View File

@@ -22,9 +22,9 @@ pub struct Smtp {
#[derive(Debug, Fail)]
pub enum SmtpError {
#[fail(display = "Envelope error: {}", _0)]
EnvelopeError(lettre::error::Error),
EnvelopeError(#[cause] lettre::error::Error),
#[fail(display = "Send error: {}", _0)]
SendError(lettre::smtp::error::Error),
SendError(#[cause] lettre::smtp::error::Error),
#[fail(display = "SMTP has no transport")]
NoTransport,
}