Repository navigation
0.4.0 improves existing logic and updates certain properties of the crate.
From 0.2.0 to 0.4.0 all conversion methods return Cow. The benefit of this is if the original input is already in the form of the case, then it does not reallocate (instead returns the original reference).
This is a breaking change. Although simple to mitigate and cargo fix should reveal what to do.
For example if you want the original String behavior, you should use Cow::to_owned.
- let x: String = input.to_snake_case();
+ let x: String = input.to_snake_case().to_owned();You should try avoid allocating and try to integrate the following instead
let x: &str = &input.to_snake_case();No idea why I set it to
0.4.0rather than0.3.0, I think I version numbers up with another project