-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update strum monorepo to 0.26.0 #995
base: main
Are you sure you want to change the base?
Conversation
|
c2d89d0
to
9092ff5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #995 +/- ##
==========================================
+ Coverage 60.12% 69.13% +9.01%
==========================================
Files 88 125 +37
Lines 12356 16687 +4331
Branches 2010 2798 +788
==========================================
+ Hits 7429 11537 +4108
- Misses 3238 5150 +1912
+ Partials 1689 0 -1689
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
723155d
to
e6323c4
Compare
e6323c4
to
4fdcd90
Compare
4fdcd90
to
a1e27da
Compare
a2e14c7
to
12abecc
Compare
b9c8ef1
to
175abbd
Compare
4846771
to
be273fb
Compare
5428ec2
to
598e0cf
Compare
b215857
to
b445b4e
Compare
3049349
to
bef748e
Compare
bef748e
to
96ce567
Compare
This PR contains the following updates:
0.25.0
->0.26.0
0.25.1
->0.26.0
Release Notes
Peternator7/strum (strum)
v0.26.3
Compare Source
EnumTable
because it's going to be deprecated in the nextversion.
itertools
by using the fullyqualified name rather than the inherent method.
string interpolation.
#[strum(to_string = "Field 0: {0}, Field 1: {1})")]
will now work for tuple variantsv0.26.2
Compare Source
EnumTryAs
AsRefStr
. Technically a breaking change,but
prefix
was just added in0.26.0
so it's a newer feature and it makes the feature more consisent in general.v0.26.1
core
instead ofstd
in VariantArray.v0.26.0
Breaking Changes
EnumVariantNames
macro has been renamedVariantNames
. The deprecation warning should steer you inthe right direction for fixing the warning.
added the implementation in your code.
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.closer to a mirror of the original and that's always the goal.
New features
The
VariantArray
macro has been added. This macro adds an associated constantVARIANTS
to your enum. The constantis a
&'static [Self]
slice so that you can access all the variants of your enum. This only works on enums that onlyhave unit variants.
The
EnumTable
macro has been experimentally added. This macro adds a new type that stores an item for each variantof the enum. This is useful for storing a value for each variant of an enum. This is an experimental feature because
I'm not convinced the current api surface area is correct.
Display
has 2 new features:the
strum(prefix = "some_value")
attribute on an enum now allows you to prepend a string onto everyvariant when you serialize it.
Custom
to_string
andserialize
attributes now support string interopolation on serialization.PR's Merged
std::fmt::Debug
VariantArray
EnumTable
macro to generate a mapping between fieldless variants and data.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.