rfcs
rfcs copied to clipboard
Enum::iter() for fieldless enums
There are various crates that allow for iterating over the constants in an enum, but such a core feature should be part of the standard library.
Given that the linked crate has ~50k downloads over the course of a 1 1/2 years, I'm not inclined to believe that it's a "core feature". This should stay as an external crate.
Note: Rust has other "core features" as crates because it is so easy to link in a crate, and makes it easier to fix bugs. A bug in std is a bug forever (see std channels), but a bug in an external crate can be fixed.
FWIW, there are other crates that do similar, such as strum_macros. If someone was truly interested in pushing this forward, I'd encourage them to do a broad review of the ecosystem to find how many potential crates exist and how many uses they have, plus whatever feedback from people who implemented the iterator "by hand" without a crate.
Given that the linked crate has ~50k downloads over the course of a 1 1/2 years, I'm not inclined to believe that it's a "core feature". This should stay as an external crate.
If the logic for not including this was that it had too few downloads, I think it's worth mentioning that enum-iterator now has 2M+ downloads. I end up using it in all of my projects of sufficient scale.

Given that the linked crate has ~50k downloads over the course of a 1 1/2 years, I'm not inclined to believe that it's a "core feature". This should stay as an external crate.
Note: Rust has other "core features" as crates because it is so easy to link in a crate, and makes it easier to fix bugs. A bug in std is a bug forever (see std channels), but a bug in an external crate can be fixed.
strongly disagree
Given that the linked crate has ~50k downloads over the course of a 1 1/2 years, I'm not inclined to believe that it's a "core feature". This should stay as an external crate.
If the logic for not including this was that it had too few downloads, I think it's worth mentioning that enum-iterator now has 2M+ downloads. I end up using it in all of my projects of sufficient scale.
it is now 3,158,869 and still growing everyday
Given that the linked crate has ~50k downloads over the course of a 1 1/2 years, I'm not inclined to believe that it's a "core feature". This should stay as an external crate.
If the logic for not including this was that it had too few downloads, I think it's worth mentioning that enum-iterator now has 2M+ downloads. I end up using it in all of my projects of sufficient scale.
it is now 3,158,869 and still growing everyday
And strum_macros has 17.8 million. I would love to have this feature too.