fix(deps): update strum monorepo to 0.27.0 - autoclosed
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| strum | dependencies | minor |
0.26.3 -> 0.27.0
|
| strum_macros | dependencies | minor |
0.26.4 -> 0.27.0
|
Release Notes
Peternator7/strum (strum)
v0.27.2
-
#141: Adding support for doc comments on
EnumDiscriminantsgenerated type.- The doc comment will be copied from the variant on the type itself.
-
#435:allow discriminants on empty enum.
-
#443: Change enum table callbacks to FnMut.
-
#444: Add
#[automatically_derived]to theimpls by @dandedotdev in https://github.com/Peternator7/strum/pull/444- This should make the linter less noisy with warnings in generated code.
-
#440: Implement a
suffixattribute for serialization of enum variants.#[derive(strum::Display)] #[strum(suffix=".json")] #[strum(serialize_all="snake_case")] enum StorageConfiguration { PostgresProvider, S3StorageProvider, AzureStorageProvider, } fn main() { let response = SurveyResponse::Other("It was good".into()); println!("Loading configuration from: {}", StorageConfiguration::PostgresProvider); // prints: Loaded Configuration from: postgres_provider.json } -
#446: Drop needless
rustversiondependency.
v0.27.1
-
#414: Fix docrs build error.
-
#417: Mention
parse_error_tyandparse_error_fnthat had been left out of the docs accidentally. -
#421#331: Implement
#[strum(transparent)]attribute onIntoStaticStr,DisplayandAsRefStrthat forwards the implmenentation to the inner value. Note that for static strings, the inner value must be convertible to an&'static str.#[derive(strum::Display)] enum SurveyResponse { Yes, No, #[strum(transparent)] Other(String) } fn main() { let response = SurveyResponse::Other("It was good".into()); println!("Question: Did you have fun?"); println!("Answer: {}", response); // prints: Answer: It was good }
v0.27.0
Highlights
-
#407:
Displayis now correctly derived in[no_std]projects. -
#402:
EnumIternow implementsSend + Sync -
#400:
EnumTryAsnow handles attributes on variant fields correctly. -
#398:
strumis now on rust 2021 -
#391:
EnumPropertiescorrectly implementsget_boolandget_intfinally.🎉 -
#380:
FromStringnow supports 2 additional attributes,parse_error_tyandparse_error_fnthat can be added to use a custom error type rather than the default strum error message.-
#410: These attributes accept a
Pathrather than aStringto improve behavior with rust-analyzer.
-
#410: These attributes accept a
Breaking Changes
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.