You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when deriving the EnumCount trait, the disabled variant is still counted in the final count.
Here is some example code:
use strum::EnumCount;#[derive(strum::EnumCount)]enumFields{Field0,Field1,Field2,#[strum(disabled)]Unknown,}fnmain(){println!("Count: {}", Fields::COUNT);}
The additional attributes docs define the
disabled
attribute as:However, when deriving the
EnumCount
trait, the disabled variant is still counted in the final count.Here is some example code:
Expected output:
Count: 3
Actual output:
Count: 4
This issue seems similar to #244
The text was updated successfully, but these errors were encountered: