Skip to content

Enable password-hash/std feature#141

Merged
tarcieri merged 1 commit into
RustCrypto:masterfrom
li-kai:master
Feb 28, 2021
Merged

Enable password-hash/std feature#141
tarcieri merged 1 commit into
RustCrypto:masterfrom
li-kai:master

Conversation

@li-kai

@li-kai li-kai commented Feb 28, 2021

Copy link
Copy Markdown
Contributor

Enables password-hash/std feature, allowing crates like argon2 to throw error up from password-hash.

This is helpful in situations where you want to bubble up the error:

error[E0277]: the trait bound `HashError: StdError` is not satisfied
   --> auth/src/models.rs:104:47
    |
104 |     let parsed_hash = PasswordHash::new(&hash)?;
    |                                               ^ the trait `StdError` is not implemented for `HashError`
    |
    = note: required because of the requirements on the impl of `From<HashError>` for `anyhow::Error`
    = note: required by `std::convert::From::from`

@tarcieri

Copy link
Copy Markdown
Member

Thank you! This seems like an oversight.

@tarcieri tarcieri merged commit 49db66f into RustCrypto:master Feb 28, 2021
@tarcieri tarcieri mentioned this pull request Feb 28, 2021
This was referenced Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants