Use semver minor version rather than patch version in README.
Since doc.rs can resolve crate versions just like `cargo`, this will make the links point to the latest
version of the documentation.
* Adding vis to EnumDiscriminants (#137)
* Improved doctest example names (#137)
* Fixing incorrect occurrence_error attr string
* Using r#pub on doctest
* Adding tests for discriminant visibility, and rustc-cfg for bare "pub"
* Doing local import with "self::"
* Back to having tests pass on latest stable
* Moved sample doctest with vis example to separate nocompile block
* Remove unused method NestedMetaHelpers::expect_lit
* Use references match instead of ref patterns
* Use custom meta types instead of syn::Meta
This should improve both readability of the code and the quality of
error messages.
* Replace TryFrom<&str> with FromStr
* Restore Rust 1.31.1 compatibility
* Re-run `cargo fmt`
* Remove unnecessary main in doctest
* Use syn::parse_macro_input!
* Add spans to attribute parse errors
* Add spans to more attribute errors
* Fix indentation
* Consistently import syn AST types
* example usage as doctests added to the strum_macros crate
* removed links to to wiki example code and documentation of the macros
* added attribute documentation as a module in strum and linked to it
The README.md hardcoded the version `0.18.0` in the `Cargo.toml` description. This changes it to `0.19` without the patch version, ensuring that it will be accurate until the next minor release.
* Add repository link in strum crate Cargo.toml
Having a repository link provides a helpful backlink to the crate in docs.rs
* Remove extra space character
* Implemented DoubleEndedIterator for EnumIter.
* Fixed overlapping behaviour of next and next_back.
* Changed names of tests I accidentally swapped.
* Fixed size_hint() for EnumIter.
* Implemented more efficient version of nth() for EnumIter.
* Added another test of `next` and `next_back`, where the last call is to `next`.
* Add VariantNames trait with the variants() function which the EnumVariantNames macro implements
* Consider generics in the impl block + use absolute path for the trait
* Upgrading Syn and Quote to 1.0 and performing refactoring of helpers
* added newlines at the end of some files
* Did additional refactoring and added helpful trait methods to improve readability
* Shortened README and moved content to the wiki
* Updated README and changelog
* ran cargo fmt
Currently the README does not mention that extra attributes may be
passed to `#[strum_discriminants()]` and that these will be added as
attributes on the generated enum. This is a cool feature, we should
document it.
* Add `EnumVariantNames`
This derive adds a static `variants()` methods yielding the names of
the enum variants. This happens to be exactly what clap [wants][1], and
is the last puzzle piece to use strum with clap/structopt.
[1]: https://docs.rs/clap/2.33.0/clap/macro.arg_enum.html
* Expand readme section for `EnumVariantNames`
* Return slice instead of array
This reduces the risk of breaking the public API by accident when adding
a new variant.
* Fix typo in Readme
* Add generic doc comment to `variants()` method
* Add test case using `variants` in clap/structopt