rust impl stdError trait (#1890)

* impl stdError trait

* Update CONTRIBUTORS
This commit is contained in:
dobefore 2022-05-31 15:52:12 +08:00 committed by GitHub
parent 14546e5d6b
commit b4cffe2339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -101,6 +101,7 @@ Patric Cunha <patricc@agap2.pt>
Brayan Oliveira <github.com/BrayanDSO>
Luka Warren <github.com/lukawarren>
wisherhxl <wisherhxl@gmail.com>
dobefore <1432338032@qq.com>
********************

View file

@ -51,6 +51,8 @@ pub enum AnkiError {
ImportError(ImportError),
}
impl std::error::Error for AnkiError {}
impl Display for AnkiError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self)