Closed rockboynton closed 8 months ago
I wasn't aware that crate existed! I wanted to get iterator into the initial version, but there was already a lot going on.
So it's on my radar, but given that other crate exists, what makes EnumTable a better choice than enum_map?
I think enum_iter
provides mostly a subset of strum
, except in this case. It would be nice to add this feature to strum
to allow me to remove a dependency. For me, the .all_ok()
method of EnumTable
makes it so I can use the ?
operator when building the table with from_closure
which is a big limitation of enum_map
.
That's my 2 cents. Since EnumTable
now exists, adding the associated iterator methods seems like a natural extension
fwiw I would also say I think the API of enum_map
's EnumMap<MyEnum, V>
makes more sense than a generated MyEnumTable<V>
and would match the API of similar rust collections better
I'm more inclined to think that given enum_map
exists, it just makes more sense to deprecate EnumTable
since it's generally a more feature complete implementation.
I'm going to move toward deprecating EnumTable from strum. Thanks for making me aware of enum_map
. I think it's a better solution and there isn't a lot of reason for both to exist.
Sounds good, it would be improvement to that crate instead
See the API for enum_map::EnumMap. This would allow for things such as