make QrError std::error::Error

This commit is contained in:
Ethan Pailes 2018-10-13 13:38:39 -04:00
parent 14e81b3502
commit 959137cf61

View file

@ -41,6 +41,12 @@ impl Display for QrError {
} }
} }
impl ::std::error::Error for QrError {
fn description(&self) -> &'static str {
"QrError"
}
}
/// `QrResult` is a convenient alias for a QR code generation result. /// `QrResult` is a convenient alias for a QR code generation result.
pub type QrResult<T> = Result<T, QrError>; pub type QrResult<T> = Result<T, QrError>;