Skip to content

arr! cannot be imported with use syntax #42

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

Closed
lovasoa opened this issue Aug 1, 2019 · 2 comments
Closed

arr! cannot be imported with use syntax #42

lovasoa opened this issue Aug 1, 2019 · 2 comments

Comments

@lovasoa
Copy link

lovasoa commented Aug 1, 2019

The following does not work, and it is annoying when defining a static key and iv using rust 2018 :

use block_cipher_trait::generic_array::arr;
let key = arr![u8; 91,99,219,17,59,122,243,224,177,67,85,86,200,249,83,12];

The problem has been fixed in generic-array, but block_cipher_trait still requires and re-exports an old version of generic-array.

It would be nice if the dependency could be bumped to the latest version, and a new version of this crate were published.

@newpavlov
Copy link
Member

We plan to publish new versions (though no ETA yet) with a bumped generic-array version. Meanwhile you can write code like this:

// type inference usually will deduce a correct type
let key = [91,99,219,17,59,122,243,224,177,67,85,86,200,249,83,12].into();

@tarcieri
Copy link
Member

tarcieri commented Jun 2, 2020

Going to go ahead and close this out as all of the crates are now 2018 edition (on master, as -pre releases) and I confirmed this now works.

See #43 for release tracking.

@tarcieri tarcieri closed this as completed Jun 2, 2020
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

3 participants