Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in current rust version #9

Open
BoostCookie opened this issue Nov 13, 2022 · 0 comments
Open

Compilation error in current rust version #9

BoostCookie opened this issue Nov 13, 2022 · 0 comments

Comments

@BoostCookie
Copy link

Just doing git clone "https://github.com/tmthecoder/xotp.git"; cd xotp; cargo test gives me errors:

% cargo test
   Compiling xotp v0.4.0 (/home/geher/SonstigesSSD/Projects/xotp)
error[E0277]: the trait bound `D: InnerInit` is not satisfied
  --> src/util.rs:66:20
   |
66 |     let mut hmac = <D>::new_from_slice(secret).expect("Failed to initialize HMAC");
   |                    ^^^^^^^^^^^^^^^^^^^ the trait `InnerInit` is not implemented for `D`
   |
   = note: required because of the requirements on the impl of `KeyInit` for `D`
note: required by a bound in `hmac::Mac::new_from_slice`
  --> /home/geher/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/digest-0.10.5/src/mac.rs:35:15
   |
35 |         Self: KeyInit;
   |               ^^^^^^^ required by this bound in `hmac::Mac::new_from_slice`
help: consider further restricting this bound
   |
65 | fn hash_internal<D: Mac + hmac::digest::InnerInit>(msg: &[u8], secret: &[u8]) -> Vec<u8> {
   |                         +++++++++++++++++++++++++

For more information about this error, try `rustc --explain E0277`.
error: could not compile `xotp` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

I'm using

% cargo version
cargo 1.60.0-nightly (95bb3c92b 2022-01-18)
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

No branches or pull requests

1 participant