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
I'm using some code that has generated structs and enums, and some of the enumerations are called Option. They are on their own module/crate but there seems to be a conflict with the std::option::Option.
The following does work (note Options, not Option as the name of the enum)
#[derive(strum_macros::EnumIter,Debug)]pubenumOptions{Open,Closed,}use strum::IntoEnumIterator;fnmain(){for variant incrate::Options::iter(){println!("The door is {:?}", variant);}}
the following does not work (the name of the enum is now Option)
#[derive(strum_macros::EnumIter,Debug)]pubenumOption{Open,Closed,}use strum::IntoEnumIterator;fnmain(){for variant incrate::Option::iter(){println!("The door is {:?}", variant);}}
The text was updated successfully, but these errors were encountered:
I'm using some code that has generated structs and enums, and some of the enumerations are called
Option
. They are on their own module/crate but there seems to be a conflict with the std::option::Option.The following does work (note Options, not Option as the name of the enum)
the following does not work (the name of the enum is now Option)
The text was updated successfully, but these errors were encountered: