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
Currently if you use arg_enum! to create possible values into an enum, you must either allow non-camel-case enum variants (to suppress the warning), or force users to start their possible values with an upper case character. For example, if you had a --mode which accepted an arg_enum! of
arg_enum!{enum{Vi,Emacs}}
The user must use $ myprog --mode Vi which isn't optimal. This enum should be able to match viorVi.
Simply converting to lowercase is also a very tricky subject if utf-8 is to be supported. But being, I don't use any non-ascii characters on a regular basis, I'm unfamiliar with capital/lowercase unicode graphemes.
The text was updated successfully, but these errors were encountered:
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
Currently if you use
arg_enum!
to create possible values into an enum, you must either allow non-camel-case enum variants (to suppress the warning), or force users to start their possible values with an upper case character. For example, if you had a--mode
which accepted anarg_enum!
ofThe user must use
$ myprog --mode Vi
which isn't optimal. This enum should be able to matchvi
orVi
.Simply converting to lowercase is also a very tricky subject if
utf-8
is to be supported. But being, I don't use any non-ascii characters on a regular basis, I'm unfamiliar with capital/lowercase unicode graphemes.The text was updated successfully, but these errors were encountered: