alekratz / enum-methods

Method generation for enumerated types in Rust
Apache License 2.0
12 stars 3 forks source link

Convert CamelCase enum variants to snake_case #1

Closed alekratz closed 7 years ago

alekratz commented 7 years ago

For example,

enum MyEnum {
    SomeVariant(i32),
}

will have a member generated as fn somevariant(&self) -> .... Although it is a breaking change, I want it to automatically convert to its snake_case name, i.e. some_variant.