57 curated breaking changes across major versions of strum. Use this as a migration checklist before bumping dependencies.
EnumDiscriminant now inherits the repr and discriminant values from your main enum. This makes the discriminant type closer to a mirror of the original and that's always the goal.
`Display` now supports format strings using named fields in the enum variant. This should be a no-op for most code. However, if you were outputting a string like `"Hello {field}"`, this will now be interpretted as a format string.
The Iterator struct generated by EnumIter now has new bounds on it. This shouldn't break code unless you manually added the implementation in your code.
The `EnumVariantNames` macro has been renamed `VariantNames`. The deprecation warning should steer you in the right direction for fixing the warning.
[#474](https://github.com/Peternator7/strum/pull/474): EnumDiscriminants will now copy `default` over from the
[#431](https://github.com/Peternator7/strum/pull/431): Fix bug where `EnumString` ignored the `parse_err_ty`
[#469](https://github.com/Peternator7/strum/pull/469): Use absolute paths in generated proc macro code to avoid
[#465](https://github.com/Peternator7/strum/pull/465): Upgrade `phf` dependency to v0.13.
[#473](https://github.com/Peternator7/strum/pull/473): Fix `cargo fmt` / `clippy` issues and add GitHub Actions CI.
[#477](https://github.com/Peternator7/strum/pull/477): `strum::ParseError` now implements `core::fmt::Display` instead
[#476](https://github.com/Peternator7/strum/pull/476): **Breaking Change** - `EnumString` now implements `From<&str>`
Previously only list-style attributes (e.g. `#[strum_discriminants(derive(...))]`) were supported. Now path-only
[#461](https://github.com/Peternator7/strum/pull/461): Allow any kind of passthrough attributes on `EnumDiscriminants`.
[#462](https://github.com/Peternator7/strum/pull/462): Add missing `#[automatically_derived]` to generated impls not
[#466](https://github.com/Peternator7/strum/pull/466): Bump MSRV to 1.71, required to keep up with updated `syn` and
[#391](https://github.com/Peternator7/strum/pull/391): `EnumProperties` doesn't provide default implementations anymore.
[#384](https://github.com/Peternator7/strum/pull/384): MSRV is now 1.66.1
[#334](https://github.com/Peternator7/strum/pull/334): Support prefix in `AsRefStr`. Technically a breaking change,
[#337](https://github.com/Peternator7/strum/pull/337): Fix missing generic impls for `EnumTryAs`
EnumDiscriminant now inherits the repr and discriminant values from your main enum. This makes the discriminant type
The Iterator struct generated by EnumIter now has new bounds on it. This shouldn't break code unless you manually
`Display` now supports format strings using named fields in the enum variant. This should be a no-op for most code.
The `EnumVariantNames` macro has been renamed `VariantNames`. The deprecation warning should steer you in
[268](https://github.com/Peternator7/strum/pull/268) Update the behavior of `EnumCount` to exclude variants that are
[270](https://github.com/Peternator7/strum/pull/270) Change the `to_string` behavior when using `default`. Now, when
[#261](https://github.com/Peternator7/strum/pull/261) Upgrade syn dependency to version 2. This bumps the msrv to
[#231](https://github.com/Peternator7/strum/pull/231) Add ignore lints for EnumIter not implementing Copy or Debug
[#220](https://github.com/Peternator7/strum/pull/220). Add support for PHF in `EnumString` (opt-in runtime
[#217](https://github.com/Peternator7/strum/pull/217): Automatically implement `TryFrom` in `FromRepr`. This is
Reverted [#217](https://github.com/peternator7/strum/pull/217) because it was disruptive and non-trivial to work around
[#224](https://github.com/Peternator7/strum/pull/224) tweaked the algorithm.
`from_repr` will be `const` if you use a recent rust version.
[#185](https://github.com/Peternator7/strum/pull/185) Adds the `FromRepr` derive that adds a `from_repr(x: usize) -> Option<Self>`
This cannot be a trait method currently because only inherent methods support `const`.
[#186](https://github.com/Peternator7/strum/pull/186) Automatically implement `TryFrom<str>` for enums that implement `EnumString`.
This is a small breaking change. If you had manually implemented `TryFrom<str>` for your enum, this will cause a conflict. You
[#189](https://github.com/Peternator7/strum/pull/189) Use `core::result::Result` instead of `std::result::Result`. This should be
It is unlikely this will break anyone, but the new signature for functions generated by EnumMessage
Added support for ascii_case_insensitive string comparisons. [#157](https://github.com/Peternator7/strum/pull/157)
[#160](https://github.com/Peternator7/strum/pull/160) enum messages: Make the returned values all 'static
MSRV is updated to 1.32 because `heck` does not work in `1.31.1` anymore. Rust 1.32 came out Jan 2019 so hopefully
**Breaking Changes**
Replace `std::` with `core::` to support no-std projects. [#145](https://github.com/Peternator7/strum/pull/145)
[#149](https://github.com/Peternator7/strum/pull/149) Remove the "rename" feature. In Rust 2018, macros should be
There's a regression in this release that may make strum imcompatible with other plugins if those
**Breaking Change**: EnumVariantNames now properly adjusts to the `to_string` and `serialize` attributes.
**Breaking Change**. `default` and `disabled` should now be written as markers instead of key value pairs.
Added repository to Cargo.toml. [#90](https://github.com/Peternator7/strum/pull/90)
Correctly handle fill align in `Display` impls. [#95](https://github.com/Peternator7/strum/pull/95)
**Breaking Change**: Use Associated Constant for EnumCount instead of const fn and free constant. [#99](https://github.com/Peternator7/strum/pull/99)
**Breaking Change**. Most of the strum plugins will now error more aggresively on invalid options being
Fixed a regression using `nth_back`. [#85](https://github.com/Peternator7/strum/pull/85)
Strum iterators now implemented [DoubleEndedIterator](https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html). [#60](https://github.com/Peternator7/strum/pull/60)
[#75](https://github.com/Peternator7/strum/pull/75)
[#74](https://github.com/Peternator7/strum/pull/74)
**Breaking Change**. Enum variant names now exports an associated constant `VARIANTS` in the
🐛 fix - stop incrementing iterator index after we reach the end. [#76](https://github.com/Peternator7/strum/pull/76)
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/cargo/strum