Closed guenhter closed 1 month ago
Hi,
when using the thiserror crate to create custom errors, it would be nice, if the password_hash::Error could also be used in an easy manner.
thiserror
password_hash::Error
When having this error definition:
#[derive(thiserror::Error, Debug)] pub enum SomeError { #[error("failed to hash password")] PasswordHash(#[from] password_hash::Error), }
the following error appears:
... doesn't satisfy `password_hash::Error: AsDynError<'_>` or `password_hash::Error: StdError
Could the Error be enhanced to satisfy one of those?
Have you enabled the std feature? The docs clearly state that the Error trait is "available on crate feature std only".
std
Error
I'm really sorry. Classical case of RTFM
Hi,
when using the
thiserror
crate to create custom errors, it would be nice, if thepassword_hash::Error
could also be used in an easy manner.When having this error definition:
the following error appears:
Could the Error be enhanced to satisfy one of those?