The implementation simply delegates to `std::str::FromStr`.
To maintain compatibility with Rust 1.32, a new dependency
is introduced which allows us to emit the `TryFrom<&str>`
implementation only for Rust 1.34 and above when
`std::convert::TryFrom` was stabilized.
* ToString is deprecated in favor of display.
* Remove doc(hidden)
* Remove references to `ToString` macro
Co-authored-by: Peter Glotfelty <peter@glotfelty.us>
This is (at least in theory) a breaking change, because someone might
have implemented this trait by hand, and their implementation won't
be declared as returning 'static lifetimes.
Closes#159
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
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