fix(deps): update rust crate strum_macros to 0.25.2
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
strum_macros | dependencies | minor |
0.24.3 -> 0.25.2
|
Release Notes
Peternator7/strum (strum_macros)
v0.25.2
- #289: Enables a previously disabled rustdoc.
-
#287: Fixes a bug in EnumIter code gen so that we produce
::core
to avoid issues with shadowing modules.
v0.25.1
-
#276. Fixes #275 and
#281. Not sure exactly why this broke, perhaps incompatibilities between
syn 1 and 2. MR fixes the issue by only looking at attributes of the "list" type
[attr(item, item)]
.
v0.25.0
Breaking Changes
-
#261 Upgrade syn dependency to version 2. This bumps the msrv to 1.56. It's impractical to maintain a package where a core dependency of the ecosystem has a different msrv than this one.
-
270 Change the
to_string
behavior when usingdefault
. Now, when usingdefault
, thedisplay
method will return the display version of the value contained in the enum rather than the name of the variant.#[derive(strum::Display)] enum Color { Red, Blue, Green, #[strum(default)] Other(String) } fn main() { // This used to print "Other", now it prints "Purple" assert_eq!(Color::Other("Purple".to_string()).to_string(), "Purple"); }
If you want the old behavior, you can use the
to_string
attribute to override this behavior. See the MR for an example. -
268 Update the behavior of
EnumCount
to exclude variants that aredisabled
. This is a breaking change, but the behavior makes it more consistent with other methods.
New Features
-
#257 This MR adds the
EnumIs
macro that automatically implementsis_{variant_name}
methods for each variant.#[derive(EnumIs)] enum Color { Red, Blue, Green, } #[test] fn simple_test() { assert!(Color::Red.is_red()); }
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.