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

implement arrays and next_array #549

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

conradludgate
Copy link

On the back of #547, starts implementing some more array features.

This one includes the arrays adapter and next_array method. They work exactly like their tuple counter parts.

It defines a new safe wrapper around [T;N] which starts out uninitialised and can be filled up safely, also implementing drop.

creates an ArrayVec type that handles uninitialised array data
@scottmcm
Copy link
Contributor

It defines a new safe wrapper around [T;N] which starts out uninitialised and can be filled up safely, also implementing drop.

This is one of those things that it might be better to just bug std about stabilizing. It's already ended up with at least 4 different PRs adding something like that, because it's just an important building block for these things.

(Said otherwise, it'd be a shame to essentially be duplicating arrayvec in here, but it's probably not a good idea to add a dep for it either.)

I'm not the maintainer here, though, so take this comment with appropriate uncertainty.

@conradludgate
Copy link
Author

Said otherwise, it'd be a shame to essentially be duplicating arrayvec in here, but it's probably not a good idea to add a dep for it either.

I had no idea about this particular crate. I'm not against adding dependencies, although that's up to the maintainers. I've submitted a PR against that crate adding just 2 features I want. If decided, it could then be used here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
const-generics Require Rust 1.51 or newer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants