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

im(arg_enum): allows ascii case insensitivity for enum variants #105

Merged
merged 1 commit into from
May 5, 2015

Conversation

kbknapp
Copy link
Member

@kbknapp kbknapp commented May 5, 2015

Allows creating an enum with CamelCase to follow Rust guidelines, but
then will match ascii case insensitive. This means variant
SomeEnum::Emacs would match string "emacs".

Closes #104

Allows creating an enum with CamelCase to follow Rust guidelines, but
then will match ascii case insensitive. This means variant
SomeEnum::Emacs would match string "emacs".

Closes #104
kbknapp added a commit that referenced this pull request May 5, 2015
im(arg_enum): allows ascii case insensitivity for enum variants
@kbknapp kbknapp merged commit 7880da6 into master May 5, 2015
@kbknapp kbknapp deleted the patch-104 branch May 5, 2015 17:19
@Byron
Copy link
Contributor

Byron commented May 5, 2015

I recommend adding a test for this feature - for some reason it didn't work for me and lower-case versions were not recognized. I have seen the code and would believe it should work too, but ... a test will just make sure of it and is easy to implement too.

@kbknapp
Copy link
Member Author

kbknapp commented May 5, 2015

Just found the issue - it's due to four different rules based off the enum type (pub/priv, derives/not). I'm putting in a fix right now.

You're right though, I need to write a test for this.

@kbknapp
Copy link
Member Author

kbknapp commented May 5, 2015

Once #106 is merged, this should work. It doesn't include a test though, I'll have to write that tonight, then I'll bump the crates.io version.

@kbknapp
Copy link
Member Author

kbknapp commented May 5, 2015

Everything should be good now.

@Byron
Copy link
Contributor

Byron commented May 6, 2015

Thank you, it does indeed !
I am using it now as per this issue.

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

Successfully merging this pull request may close these issues.

Allow case insensitivity in arg_enum! macro
2 participants