Fix custom Error not implementing std::error::Error

This commit is contained in:
2019-10-09 23:29:17 +02:00
parent c10d96bf83
commit 891c7a183d
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -35,3 +35,5 @@ impl From<std::num::ParseIntError> for Error {
NumParseError
}
}
impl std::error::Error for Error {}
+5
View File
@@ -98,3 +98,8 @@ Digest username="Mufasa",
.trim()
);
}
#[test]
fn test_cast_error() {
let _m : Box<dyn std::error::Error> = Error::UnknownAlgorithm("Uhhh".into()).into();
}