forked from packages/digest_auth_rs
Fix custom Error not implementing std::error::Error
This commit is contained in:
@@ -35,3 +35,5 @@ impl From<std::num::ParseIntError> for Error {
|
||||
NumParseError
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for Error {}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user