Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Conversation

@phimuemue
Copy link
Contributor

I read in README that

library doesn't provide Minimum Supported Rust Version (MSRV).

If this means that we could use features from stable Rust, here's a PR that eliminates EnumArray, exploiting GADTs. This allows simpler trait bounds (simply Enum instead of EnumArray<V>), which may be valuable for users.

@sugar700
Copy link
Owner

sugar700 commented Nov 7, 2022

This is something I already look into in gat branch https://github.com/xfix/enum-map/tree/gat. At this point I'm mostly trying to figure out what do I do about LENGTH in trait and whether this is a sound approach. This is a breaking change, so it's something I want to get right.

MSRV isn't an issue, even if enum-map had an actual MSRV policy (and I will probably provide one once some policy gets determined in rust-lang/libs-team#72), using GATs would be a breaking change anyways (removal of EnumArray means that bounds that used it no longer work), so it would have to be released as enum-map 3.0.0.

@DCNick3
Copy link

DCNick3 commented Jan 2, 2023

I really love the change! It allows me to make a struct generic over EnumMap key without exposing the values I want to use inside. I would really like to see this moving forward!

What potential soundness problems do you see?

@sugar700
Copy link
Owner

Closing, the current pull request is #35.

@sugar700 sugar700 closed this Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants