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

feat+refactor: Bump MSRV to 1.83.0 and maximize const #294

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

Conversation

Daniel-Aaron-Bloom
Copy link

@Daniel-Aaron-Bloom Daniel-Aaron-Bloom commented Feb 23, 2025

Find every fn which can be const (as of 1.83.0) and make it so. This involved moving all the implementations out of the ArrayVecImpl trait, which eventually left it unused, so I removed it.

You could probably also remove MakeMaybeUninit and just have new_const call new if you wanted to.

@Daniel-Aaron-Bloom Daniel-Aaron-Bloom changed the title feat+refactor: Maximize const feat+refactor: Bump MSRV to 1.83.0 and maximize const Feb 23, 2025
@tbu-
Copy link
Collaborator

tbu- commented Mar 7, 2025

What's your motivation for this pull request? This currently raises the MSRV quite substantially, so it should have a good motivation, at the very least.

@Daniel-Aaron-Bloom
Copy link
Author

I made this crate, and doing that was my motivation.

The summary is: now that &mut is const-compatible, you can make almost everything in ArrayVec into a const fn. Having a mut ArrayVec at compile-time is extremely powerful.

For now I've just forked this crate as arrayvec-const, but that's basically just a hack.

@Daniel-Aaron-Bloom
Copy link
Author

Do you think this would be better served via a feature-flag?

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