-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Labels
digestHash function crateHash function crate
Description
The Mac::new trait is defined as:
fn new(key: &Key<Self>) -> Self
where
Self: KeyInit;...but it provides no default definition, requires Self impl KeyInit, and causes ambiguity:
error[E0034]: multiple applicable items in scope
--> aes-siv/src/siv.rs:81:22
|
81 | let mac = M::new(GenericArray::from_slice(&key[..M::KeySize::to_usize()]));
| ^^^ multiple `new` found
|
note: candidate #1 is defined in the trait `KeyInit`
--> /Users/tony/.cargo/registry/src/github.com-1ecc6299db9ec823/crypto-common-0.1.3/src/lib.rs:115:5
|
115 | fn new(key: &Key<Self>) -> Self;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `Mac`
--> /Users/tony/.cargo/registry/src/github.com-1ecc6299db9ec823/digest-0.10.3/src/mac.rs:21:5
|
21 | / fn new(key: &Key<Self>) -> Self
22 | | where
23 | | Self: KeyInit;
| |______________________^
help: disambiguate the associated function for candidate #1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
digestHash function crateHash function crate