This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
-
If you don't have rust installed: Install rustup
-
For normal development on
masterrun on stablerustup toolchain install stablerustup default stable
-
For development with benchmarks run nightly
rustup toolchain install nightlyrustup default nightly
- Fork it ( https://github.com/whatisinternet/inflector/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Add test for the new feature (conversions to all different casts MUST also pass)
- Write some code to pass the tests
- Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
cargo test
cargo bench --features=unstable
- Please ensure you fill out an issue
- Be available for questions.
- Awesome!
- Has everything been run through spell check?
- Have you added doc tests and do they pass?
- Do all other tests pass?
- Have you added trait tests? (If applicable)
- Have you filled out the pull request template?
Traits are now both easy to add and easy to test. Just follow the next steps:
src/lib.rs- Add the function signature to the Inflector trait
//...
use string::singularize::to_singular;
//...
pub trait Inflector { // Or InflectorNumbers
//...
fn your_trait(&self) -> [return_type];
//...
}- Add the function name an return type to either
implement_string_fororimplement_number_for
your_trait => [return_type]- Add a benchmark following the current convention
tests/lib.rs- Add your trait following the current convention and the test will be automatically generated
Thank you for your help! ❤️