Update Rust crate strum to 0.28.0 #13

Open
renovate-bot wants to merge 1 commit from renovate-strum-0.x into master
Collaborator

This PR contains the following updates:

Package Type Update Change
strum dependencies minor 0.27.20.28.0

Release Notes

Peternator7/strum (strum)

v0.28.0

Compare Source

  • #​461: Allow any kind of passthrough attributes on EnumDiscriminants.

    • Previously only list-style attributes (e.g. #[strum_discriminants(derive(...))]) were supported. Now path-only
      (e.g. #[strum_discriminants(non_exhaustive)]) and name/value (e.g. #[strum_discriminants(doc = "foo")])
      attributes are also supported.
  • #​462: Add missing #[automatically_derived] to generated impls not
    covered by #​444.

  • #​466: Bump MSRV to 1.71, required to keep up with updated syn and
    windows-sys dependencies. This is a breaking change if you're on an old version of rust.

  • #​469: Use absolute paths in generated proc macro code to avoid
    potential name conflicts.

  • #​465: Upgrade phf dependency to v0.13.

  • #​473: Fix cargo fmt / clippy issues and add GitHub Actions CI.

  • #​477: strum::ParseError now implements core::fmt::Display instead
    std::fmt::Display to make it #[no_std] compatible. Note the Error trait wasn't available in core until 1.81
    so strum::ParseError still only implements that in std.

  • #​476: Breaking Change - EnumString now implements From<&str>
    (infallible) instead of TryFrom<&str> when the enum has a #[strum(default)] variant. This more accurately
    reflects that parsing cannot fail in that case. If you need the old TryFrom behavior, you can opt back in using
    parse_error_ty and parse_error_fn:

    #[derive(EnumString)]
    #[strum(parse_error_ty = strum::ParseError, parse_error_fn = make_error)]
    pub enum Color {
        Red,
        #[strum(default)]
        Other(String),
    }
    
    fn make_error(x: &str) -> strum::ParseError {
        strum::ParseError::VariantNotFound
    }
    
  • #​431: Fix bug where EnumString ignored the parse_err_ty
    attribute when the enum had a #[strum(default)] variant.

  • #​474: EnumDiscriminants will now copy default over from the
    original enum to the Discriminant enum.

    #[derive(Debug, Default, EnumDiscriminants)]
    #[strum_discriminants(derive(Default))] // <- Remove this in 0.28.
    enum MyEnum {
        #[default] // <- Will be the #[default] on the MyEnumDiscriminant
        #[strum_discriminants(default)] // <- Remove this in 0.28
        Variant0,
        Variant1 { a: NonDefault },
    }
    

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [strum](https://github.com/Peternator7/strum) | dependencies | minor | `0.27.2` → `0.28.0` | --- ### Release Notes <details> <summary>Peternator7/strum (strum)</summary> ### [`v0.28.0`](https://github.com/Peternator7/strum/blob/HEAD/CHANGELOG.md#0280) [Compare Source](https://github.com/Peternator7/strum/compare/v0.27.2...v0.28.0) - [#&#8203;461](https://github.com/Peternator7/strum/pull/461): Allow any kind of passthrough attributes on `EnumDiscriminants`. - Previously only list-style attributes (e.g. `#[strum_discriminants(derive(...))]`) were supported. Now path-only (e.g. `#[strum_discriminants(non_exhaustive)]`) and name/value (e.g. `#[strum_discriminants(doc = "foo")]`) attributes are also supported. - [#&#8203;462](https://github.com/Peternator7/strum/pull/462): Add missing `#[automatically_derived]` to generated impls not covered by [#&#8203;444](https://github.com/Peternator7/strum/pull/444). - [#&#8203;466](https://github.com/Peternator7/strum/pull/466): Bump MSRV to 1.71, required to keep up with updated `syn` and `windows-sys` dependencies. This is a breaking change if you're on an old version of rust. - [#&#8203;469](https://github.com/Peternator7/strum/pull/469): Use absolute paths in generated proc macro code to avoid potential name conflicts. - [#&#8203;465](https://github.com/Peternator7/strum/pull/465): Upgrade `phf` dependency to v0.13. - [#&#8203;473](https://github.com/Peternator7/strum/pull/473): Fix `cargo fmt` / `clippy` issues and add GitHub Actions CI. - [#&#8203;477](https://github.com/Peternator7/strum/pull/477): `strum::ParseError` now implements `core::fmt::Display` instead `std::fmt::Display` to make it `#[no_std]` compatible. Note the `Error` trait wasn't available in core until `1.81` so `strum::ParseError` still only implements that in std. - [#&#8203;476](https://github.com/Peternator7/strum/pull/476): **Breaking Change** - `EnumString` now implements `From<&str>` (infallible) instead of `TryFrom<&str>` when the enum has a `#[strum(default)]` variant. This more accurately reflects that parsing cannot fail in that case. If you need the old `TryFrom` behavior, you can opt back in using `parse_error_ty` and `parse_error_fn`: ```rust #[derive(EnumString)] #[strum(parse_error_ty = strum::ParseError, parse_error_fn = make_error)] pub enum Color { Red, #[strum(default)] Other(String), } fn make_error(x: &str) -> strum::ParseError { strum::ParseError::VariantNotFound } ``` - [#&#8203;431](https://github.com/Peternator7/strum/pull/431): Fix bug where `EnumString` ignored the `parse_err_ty` attribute when the enum had a `#[strum(default)]` variant. - [#&#8203;474](https://github.com/Peternator7/strum/pull/474): EnumDiscriminants will now copy `default` over from the original enum to the Discriminant enum. ```rust #[derive(Debug, Default, EnumDiscriminants)] #[strum_discriminants(derive(Default))] // <- Remove this in 0.28. enum MyEnum { #[default] // <- Will be the #[default] on the MyEnumDiscriminant #[strum_discriminants(default)] // <- Remove this in 0.28 Variant0, Variant1 { a: NonDefault }, } ``` </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41OS4yIiwidXBkYXRlZEluVmVyIjoiNDMuMTAzLjAiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOltdfQ==-->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate-strum-0.x:renovate-strum-0.x
git switch renovate-strum-0.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff renovate-strum-0.x
git switch renovate-strum-0.x
git rebase master
git switch master
git merge --ff-only renovate-strum-0.x
git switch renovate-strum-0.x
git rebase master
git switch master
git merge --no-ff renovate-strum-0.x
git switch master
git merge --squash renovate-strum-0.x
git switch master
git merge --ff-only renovate-strum-0.x
git switch master
git merge renovate-strum-0.x
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
james/ghostrecon!13
No description provided.