strum breaking changes

cargo

53 curated breaking changes across major versions of strum. Use this as a migration checklist before bumping dependencies.

53
changes
Breaking changes by transition
  • 0.27.2 \u2192 0.28.0behavior

    [#474](https://github.com/Peternator7/strum/pull/474): EnumDiscriminants will now copy `default` over from the

  • 0.27.2 \u2192 0.28.0breaking

    [#462](https://github.com/Peternator7/strum/pull/462): Add missing `#[automatically_derived]` to generated impls not

  • 0.27.2 \u2192 0.28.0breaking

    [#466](https://github.com/Peternator7/strum/pull/466): Bump MSRV to 1.71, required to keep up with updated `syn` and

  • 0.27.2 \u2192 0.28.0breaking

    [#461](https://github.com/Peternator7/strum/pull/461): Allow any kind of passthrough attributes on `EnumDiscriminants`.

  • 0.27.2 \u2192 0.28.0breaking

    [#469](https://github.com/Peternator7/strum/pull/469): Use absolute paths in generated proc macro code to avoid

  • 0.27.2 \u2192 0.28.0breaking

    [#465](https://github.com/Peternator7/strum/pull/465): Upgrade `phf` dependency to v0.13.

  • 0.27.2 \u2192 0.28.0breaking

    [#473](https://github.com/Peternator7/strum/pull/473): Fix `cargo fmt` / `clippy` issues and add GitHub Actions CI.

  • 0.27.2 \u2192 0.28.0breaking

    [#477](https://github.com/Peternator7/strum/pull/477): `strum::ParseError` now implements `core::fmt::Display` instead

  • 0.27.2 \u2192 0.28.0breaking

    [#476](https://github.com/Peternator7/strum/pull/476): **Breaking Change** - `EnumString` now implements `From<&str>`

  • 0.27.2 \u2192 0.28.0breaking

    [#431](https://github.com/Peternator7/strum/pull/431): Fix bug where `EnumString` ignored the `parse_err_ty`

  • 0.27.2 \u2192 0.28.0breaking

    Previously only list-style attributes (e.g. `#[strum_discriminants(derive(...))]`) were supported. Now path-only

  • 0.26.4 \u2192 0.27.0behavior

    [#391](https://github.com/Peternator7/strum/pull/391): `EnumProperties` doesn't provide default implementations anymore.

  • 0.26.4 \u2192 0.27.0breaking

    [#384](https://github.com/Peternator7/strum/pull/384): MSRV is now 1.66.1

  • 0.26.1 \u2192 0.26.2breaking

    [#334](https://github.com/Peternator7/strum/pull/334): Support prefix in `AsRefStr`. Technically a breaking change,

  • 0.26.1 \u2192 0.26.2breaking

    [#337](https://github.com/Peternator7/strum/pull/337): Fix missing generic impls for `EnumTryAs`

  • 0.25.3 \u2192 0.26.0breaking

    `Display` now supports format strings using named fields in the enum variant. This should be a no-op for most code.

  • 0.25.3 \u2192 0.26.0breaking

    EnumDiscriminant now inherits the repr and discriminant values from your main enum. This makes the discriminant type

  • 0.25.3 \u2192 0.26.0breaking

    The Iterator struct generated by EnumIter now has new bounds on it. This shouldn't break code unless you manually

  • 0.25.3 \u2192 0.26.0renamed

    The `EnumVariantNames` macro has been renamed `VariantNames`. The deprecation warning should steer you in

  • 0.24.3 \u2192 0.25.0behavior

    [270](https://github.com/Peternator7/strum/pull/270) Change the `to_string` behavior when using `default`. Now, when

  • 0.24.3 \u2192 0.25.0behavior

    [268](https://github.com/Peternator7/strum/pull/268) Update the behavior of `EnumCount` to exclude variants that are

  • 0.24.3 \u2192 0.25.0breaking

    [#261](https://github.com/Peternator7/strum/pull/261) Upgrade syn dependency to version 2. This bumps the msrv to

  • 0.24.2 \u2192 0.24.3breaking

    [#231](https://github.com/Peternator7/strum/pull/231) Add ignore lints for EnumIter not implementing Copy or Debug

  • 0.24.0 \u2192 0.24.2breaking

    [#217](https://github.com/Peternator7/strum/pull/217): Automatically implement `TryFrom` in `FromRepr`. This is

  • 0.24.0 \u2192 0.24.2breaking

    [#220](https://github.com/Peternator7/strum/pull/220). Add support for PHF in `EnumString` (opt-in runtime

  • 0.24.0 \u2192 0.24.2breaking

    [#224](https://github.com/Peternator7/strum/pull/224) tweaked the algorithm.

  • 0.24.0 \u2192 0.24.2breaking

    Reverted [#217](https://github.com/peternator7/strum/pull/217) because it was disruptive and non-trivial to work around

  • 0.22.0 \u2192 0.23.0breaking

    This is a small breaking change. If you had manually implemented `TryFrom<str>` for your enum, this will cause a conflict. You

  • 0.22.0 \u2192 0.23.0breaking

    [#186](https://github.com/Peternator7/strum/pull/186) Automatically implement `TryFrom<str>` for enums that implement `EnumString`.

  • 0.22.0 \u2192 0.23.0breaking

    [#185](https://github.com/Peternator7/strum/pull/185) Adds the `FromRepr` derive that adds a `from_repr(x: usize) -> Option<Self>`

  • 0.22.0 \u2192 0.23.0breaking

    This cannot be a trait method currently because only inherent methods support `const`.

  • 0.22.0 \u2192 0.23.0breaking

    `from_repr` will be `const` if you use a recent rust version.

  • 0.22.0 \u2192 0.23.0breaking

    [#189](https://github.com/Peternator7/strum/pull/189) Use `core::result::Result` instead of `std::result::Result`. This should be

  • 0.20.0 \u2192 0.21.0api

    It is unlikely this will break anyone, but the new signature for functions generated by EnumMessage

  • 0.20.0 \u2192 0.21.0breaking

    Added support for ascii_case_insensitive string comparisons. [#157](https://github.com/Peternator7/strum/pull/157)

  • 0.20.0 \u2192 0.21.0breaking

    Replace `std::` with `core::` to support no-std projects. [#145](https://github.com/Peternator7/strum/pull/145)

  • 0.20.0 \u2192 0.21.0breaking

    **Breaking Changes**

  • 0.20.0 \u2192 0.21.0breaking

    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

  • 0.20.0 \u2192 0.21.0breaking

    [#160](https://github.com/Peternator7/strum/pull/160) enum messages: Make the returned values all 'static

  • 0.20.0 \u2192 0.21.0removed

    [#149](https://github.com/Peternator7/strum/pull/149) Remove the "rename" feature. In Rust 2018, macros should be

  • 0.19.0 \u2192 0.19.1breaking

    **Breaking Change**: EnumVariantNames now properly adjusts to the `to_string` and `serialize` attributes.

  • 0.19.0 \u2192 0.19.1breaking

    There's a regression in this release that may make strum imcompatible with other plugins if those

  • 0.18.0 \u2192 0.19.0behavior

    **Breaking Change**. `default` and `disabled` should now be written as markers instead of key value pairs.

  • 0.18.0 \u2192 0.19.0breaking

    Added repository to Cargo.toml. [#90](https://github.com/Peternator7/strum/pull/90)

  • 0.18.0 \u2192 0.19.0breaking

    Correctly handle fill align in `Display` impls. [#95](https://github.com/Peternator7/strum/pull/95)

  • 0.18.0 \u2192 0.19.0breaking

    **Breaking Change**: Use Associated Constant for EnumCount instead of const fn and free constant. [#99](https://github.com/Peternator7/strum/pull/99)

  • 0.18.0 \u2192 0.19.0breaking

    **Breaking Change**. Most of the strum plugins will now error more aggresively on invalid options being

  • 0.18.0 \u2192 0.19.0breaking

    Fixed a regression using `nth_back`. [#85](https://github.com/Peternator7/strum/pull/85)

  • 0.16.0 \u2192 0.17.0breaking

    **Breaking Change**. Enum variant names now exports an associated constant `VARIANTS` in the

  • 0.16.0 \u2192 0.17.0breaking

    [#74](https://github.com/Peternator7/strum/pull/74)

  • 0.16.0 \u2192 0.17.0breaking

    [#75](https://github.com/Peternator7/strum/pull/75)

  • 0.16.0 \u2192 0.17.0breaking

    🐛 fix - stop incrementing iterator index after we reach the end. [#76](https://github.com/Peternator7/strum/pull/76)

  • 0.16.0 \u2192 0.17.0breaking

    Strum iterators now implemented [DoubleEndedIterator](https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html). [#60](https://github.com/Peternator7/strum/pull/60)

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/breaking/cargo/strum
strum breaking changes — Cargo migration guide | DepScope