Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_bool and get_int in EnumProperty are undocumented and always return None #313

Open
fritzrehde opened this issue Nov 11, 2023 · 0 comments

Comments

@fritzrehde
Copy link

When looking at EnumProperty's documentation that get_bool and get_int both always returned None.
My expectation of these way that I could set a bool in a property like so:

    #[strum(props(HideInHelp = "true"))]
    Variant,

and then I thought "true" would get parsed into a bool, and I could just check an Option<bool> with get_bool at runtime.
What I don't understand is why get_bool exists and always returns None. Is the feature not ready/implemented yet, and was accidentally added to the master branch? It should also probably be documented at least with a doc-string to prevent the confusion I ran into.
Thanks for the cool crate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant