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

Const generics #11

Merged
merged 3 commits into from
Apr 9, 2021
Merged

Const generics #11

merged 3 commits into from
Apr 9, 2021

Conversation

voidxnull
Copy link
Member

@voidxnull voidxnull commented Apr 7, 2021

There are a few issues with const generics at the moment:

  1. FromIterator is not implemented for [T; N]. So there are no ways to collect an iterator without unsafe or default (which is harder to implement in this case). More on that: Provide a means of turning iterators into fixed-size arrays rust-lang/rust#81615
  2. Serde does not support [T; N] because it breaks backwards compatibility (Const generics support  serde-rs/serde#1937).
  3. Because of the issues above it's not possible to get rid of SizedVec completely, unless we:
    1. Update https://github.com/matter-labs-archive/blake2_rfc_bellman_edition to arrayvec 0.7.
    2. Then we can use ArrayVec instead of SizedVec, since it's already a dependency.

@snjax snjax merged commit 990cac6 into master Apr 9, 2021
@snjax snjax mentioned this pull request Apr 9, 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