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

master
Ondřej Hruška 5 years ago
parent c10d96bf83
commit 891c7a183d
Signed by untrusted user: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      src/error.rs
  2. 5
      src/lib.rs

@ -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();
}

Loading…
Cancel
Save