Skip to content

Commit 323c475

Browse files
committed
Update strum_macros to 0.26.4
Test: m rust Change-Id: I1dd39cf0b26e47d9b192ca4e973cdcbcbe954388
1 parent 2dd02f3 commit 323c475

File tree

11 files changed

+126
-59
lines changed

11 files changed

+126
-59
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"package":null,"files":{".cargo-checksum.json":"5c20c1ce69ea23d2d61dcf13b032ae2aa2b29fa8a34e1abf2f57e4d355ad8bc4","Android.bp":"adc2184a419c0200731d0e6a81a8d1a449083737aa53c9014586e420b74fb751","Cargo.toml":"90f40b0d04e3d330cd5fae3c5d1d04944045e3a0ba8dce9a0bd47423d29c53e0","LICENSE":"1884079d8260fd6643f913346f742df6dabc32a0d1d1a973f6c70b2ae20383fe","METADATA":"8f07cd6e794503efad77467157be7fa09c030036131a37cc2da4842029a20eeb","MODULE_LICENSE_MIT":"0d6f8afa3940b7f06bebee651376d43bc8b0d5b437337be2696d30377451e93a","README.md":"01b98982954529385a99d3557d04bfd9d4ff2773a87fc5a8cf5d57680fe936a2","TEST_MAPPING":"130934553eb809f532f064b6d924421ef21dc989325f59a50bd6f726f2cba884","cargo_embargo.json":"fa702ccdadce959e0baa3621834e37c34b5b20d1d2993055e3efbb9ad62a03b8","src/helpers/case_style.rs":"a401e30dc1198a382681dfbc7edabe641df80e6717b6b57ad3d8f9d3457c24ca","src/helpers/inner_variant_props.rs":"fb25aac1a36405f4912d239241ed50d304946b3bdff79bd90466b41fa99785cc","src/helpers/metadata.rs":"abb82cefe57fc10d87c4fe5a4846eacd97ca3306851e28b7c7699fbdec412ddf","src/helpers/mod.rs":"928c2e83113fac0183b291b2e064bd6444140698e4b4f2410e55d85ea1deab28","src/helpers/type_props.rs":"9f7227dfe0f9ab4f1ee4dfdcb960c49db4706497861ae82cc9a9db904287ebab","src/helpers/variant_props.rs":"c007bed549c30a6c9a64521639608e7dd3e6f9c70553ec78a183ebda02bddd54","src/lib.rs":"52d5f49927e5e5c3e3d6bd668c5a24599c516121df7cbd79145943cd804586d0","src/macros/enum_count.rs":"c3f068684816e891171537745c5a4a86bbb76f74578e079880a874ef0d1e7fc5","src/macros/enum_discriminants.rs":"d80616c8889ace6e1f1e8eb036140a7127bb0a536414a20cc984933b72aa41c0","src/macros/enum_is.rs":"a67764b68d10774516aec79b4a121aa8526b85c1ba4eb19406ea839925ac2fbf","src/macros/enum_iter.rs":"761d34a9633be1f920cc04910cd70e39dd2e1830fdb3a7239eb95d79e30f7a4f","src/macros/enum_messages.rs":"ad5fc215c0e992dc09024c3ad76b8bd18a56147170bab71ab964e58c44e82cad","src/macros/enum_properties.rs":"c1a386c408a09b7af7754b0e28220ebae02abd75b123d0edac8a0f00880a633b","src/macros/enum_table.rs":"8002a82697ae43cba9cbb77baf3c6aa60f810f948c7ca97d46f0a2a96e5dbdfe","src/macros/enum_try_as.rs":"6299527af91a6478ca48c56871c2649cb19eaa371186b08b81fc21bea76b18c6","src/macros/enum_variant_array.rs":"4a82897758e6059aae96e8d999e7c69e226bd61fe54c0d9cf610bdfd38e407b9","src/macros/enum_variant_names.rs":"9c3bac48f80b7aab75d779377de56ba143e7f831d659bb4e1070ee4e6181d2fe","src/macros/from_repr.rs":"83b62edd8bfe91db286bd1531a77082d30d4f9d4ee8185f7a95689fa4860365f","src/macros/mod.rs":"d3f44f5625d76d0f114ff394d6b95723ca9f6b2a089784c09b12dab42f54cc47","src/macros/strings/as_ref_str.rs":"9f7b73f0848d346f54f0efb78de66da53c29b4d22386075554eed603e4fdb93d","src/macros/strings/display.rs":"20388c5ff17fe164d99988ca3557b0e4db2e54ca90ac4fd6b3bc34443ddbf9b4","src/macros/strings/from_string.rs":"913f990421d76985c4a609fc13d58f31c7b25dfc48f37c564feaf48a61e66fe0","src/macros/strings/mod.rs":"5f0003e2cb561686d347d008fd890d52a691e40bdbeef8a36fadc11512abcfbe","src/macros/strings/to_string.rs":"ef77f2087f20dfc2775324e99e178bc40831c1a3017de1a58104b901daced823"}}
1+
{"package":null,"files":{".cargo-checksum.json":"2a77879144dd02a4809a1cfd0b85ac8b220c32e21f7b0fc5bcfebeb40891b876","Android.bp":"7f36d73f0ae45a174d2e526edcfda3e9dba9013cf8862dba787c538f02a89851","Cargo.toml":"137ea4cd60ce441852ce8b9fa8f28991a772a52b018ef8732b5407c628166abb","LICENSE":"1884079d8260fd6643f913346f742df6dabc32a0d1d1a973f6c70b2ae20383fe","METADATA":"19f6922bf713cebe4639d26b8eec0aef31a5828908302c1833a9eee30fbc29d7","MODULE_LICENSE_MIT":"0d6f8afa3940b7f06bebee651376d43bc8b0d5b437337be2696d30377451e93a","README.md":"97422babc5ef03a7347fd1efe7c6866a231925d7e436e7f9f38caaaa0ed464a9","TEST_MAPPING":"130934553eb809f532f064b6d924421ef21dc989325f59a50bd6f726f2cba884","cargo_embargo.json":"fa702ccdadce959e0baa3621834e37c34b5b20d1d2993055e3efbb9ad62a03b8","src/helpers/case_style.rs":"a401e30dc1198a382681dfbc7edabe641df80e6717b6b57ad3d8f9d3457c24ca","src/helpers/inner_variant_props.rs":"fb25aac1a36405f4912d239241ed50d304946b3bdff79bd90466b41fa99785cc","src/helpers/metadata.rs":"abb82cefe57fc10d87c4fe5a4846eacd97ca3306851e28b7c7699fbdec412ddf","src/helpers/mod.rs":"928c2e83113fac0183b291b2e064bd6444140698e4b4f2410e55d85ea1deab28","src/helpers/type_props.rs":"9f7227dfe0f9ab4f1ee4dfdcb960c49db4706497861ae82cc9a9db904287ebab","src/helpers/variant_props.rs":"c007bed549c30a6c9a64521639608e7dd3e6f9c70553ec78a183ebda02bddd54","src/lib.rs":"d8aef53e8def3751c9f11b73f1bb9929e38cb11573072539aeaadeeec19f60e1","src/macros/enum_count.rs":"c3f068684816e891171537745c5a4a86bbb76f74578e079880a874ef0d1e7fc5","src/macros/enum_discriminants.rs":"d80616c8889ace6e1f1e8eb036140a7127bb0a536414a20cc984933b72aa41c0","src/macros/enum_is.rs":"a67764b68d10774516aec79b4a121aa8526b85c1ba4eb19406ea839925ac2fbf","src/macros/enum_iter.rs":"aded711dc8a9c334f5ac9882a6c745f48148c98f95fae1634ff01eae4eb43909","src/macros/enum_messages.rs":"ad5fc215c0e992dc09024c3ad76b8bd18a56147170bab71ab964e58c44e82cad","src/macros/enum_properties.rs":"c1a386c408a09b7af7754b0e28220ebae02abd75b123d0edac8a0f00880a633b","src/macros/enum_table.rs":"8002a82697ae43cba9cbb77baf3c6aa60f810f948c7ca97d46f0a2a96e5dbdfe","src/macros/enum_try_as.rs":"6299527af91a6478ca48c56871c2649cb19eaa371186b08b81fc21bea76b18c6","src/macros/enum_variant_array.rs":"4a82897758e6059aae96e8d999e7c69e226bd61fe54c0d9cf610bdfd38e407b9","src/macros/enum_variant_names.rs":"9c3bac48f80b7aab75d779377de56ba143e7f831d659bb4e1070ee4e6181d2fe","src/macros/from_repr.rs":"83b62edd8bfe91db286bd1531a77082d30d4f9d4ee8185f7a95689fa4860365f","src/macros/mod.rs":"d3f44f5625d76d0f114ff394d6b95723ca9f6b2a089784c09b12dab42f54cc47","src/macros/strings/as_ref_str.rs":"9f7b73f0848d346f54f0efb78de66da53c29b4d22386075554eed603e4fdb93d","src/macros/strings/display.rs":"cca176648abedbed3955ae5cbd254ea8c2dd0d8f8b3b134914258e13dea0b0a4","src/macros/strings/from_string.rs":"913f990421d76985c4a609fc13d58f31c7b25dfc48f37c564feaf48a61e66fe0","src/macros/strings/mod.rs":"5f0003e2cb561686d347d008fd890d52a691e40bdbeef8a36fadc11512abcfbe","src/macros/strings/to_string.rs":"ef77f2087f20dfc2775324e99e178bc40831c1a3017de1a58104b901daced823"}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"files":{"Cargo.toml":"092265d6ab49a30549ada59bb62e244b28649758ec3a789af589b09e07c3cc48","LICENSE":"8bce3b45e49ecd1461f223b46de133d8f62cd39f745cfdaf81bee554b908bd42","README.md":"4d1475987c8866226ac2f4136dfb5196dfd0b16a2fa3d63ddbd0f4f5011f65af","src/helpers/case_style.rs":"ac429454fad24d1a5a9829711f2024ae9477ffad7cc293b711fe588d1a5e1edf","src/helpers/inner_variant_props.rs":"09c4a2c73aadaaa934e6a20b429b99d4229ce76a4cc1edc916298100d971deb4","src/helpers/metadata.rs":"a9391071f1d4750781eda79bdf4553e77c65c28b1df87dfb3d00df6b290c18dd","src/helpers/mod.rs":"dc171dd27e723aede6c45cb981d48c710f42167afb06a5fbf013470a2962b9f2","src/helpers/type_props.rs":"cb1cdfb0e7927d3b0e364237e7048285ef5968e036d2ebacea642c66d96cc669","src/helpers/variant_props.rs":"36cc466e29b20246f87b9b87d39e4d23545596c522a201e0fb320ac2b231b045","src/lib.rs":"5198869272f00b3adc78d2ffbfb129f42062f3d5c1f3d06fe081a06c3440b51f","src/macros/enum_count.rs":"44084ab800ca8fca3b17f76c6025e8e59855598c0119807ce7bc80d5dc345d99","src/macros/enum_discriminants.rs":"98abbefad100dda4aaafa959ebb9fa77f518dd483414113e6c8bd1eea193bdff","src/macros/enum_is.rs":"cd63fb79f4f9b3479f11bce2ad45d3cb5d23f1d5c9c2a5fbb7af7e813fb70fa7","src/macros/enum_iter.rs":"a6c42eefae4e442301dfd9a622aa6a502aac7a0fc9ab7e2b8aaea221cd9d06b0","src/macros/enum_messages.rs":"ee89c3a10ebb553aa9c342f4b3b4346e97be1744fc5df72f580a331d4ea87393","src/macros/enum_properties.rs":"a9e1bf27504d46df689aad8910c7ad8ae7b3780ee97b6e659b2b19e481474030","src/macros/enum_table.rs":"434da77cbca12082d4daeba28ef0e416cea3064f1f641b31f4a330589369e04f","src/macros/enum_try_as.rs":"8bd311522786f0186290ea31a6f3483aa3fa23ccb3441b7fcf9b3743c9d3670b","src/macros/enum_variant_array.rs":"cb8de5cb5841fa9514c423c195b47a2fc13b9f5fb257093311fbb9c136c737d9","src/macros/enum_variant_names.rs":"ad4d2f87bf26e4d07327896118382a4b83c2cca5de6fdfecca6e7639eb73118b","src/macros/from_repr.rs":"561a6f10372c365674e064b31c6eb4c531ffa0b39f03476452bb0746201d579d","src/macros/mod.rs":"c94b29d4ad0f40a7803605d42647cc9fafec76545c7f3c435fe675a3102eb0ef","src/macros/strings/as_ref_str.rs":"594f29efd111ceef258ab0dd449db4cb52e638e1bd17efe589c5a90ee03686b9","src/macros/strings/display.rs":"30b2c4d4f2f29c98058dd88d004782688241a2608d2976621c6919ea0cf615cb","src/macros/strings/from_string.rs":"53d298f6859df3c13197a8bd303971d2a9ac14cb9860ea1e7c4df1bffdea58bd","src/macros/strings/mod.rs":"b7937f72a46c807fd87c787f3d23029509565a0388a30106e7026363782f2b56","src/macros/strings/to_string.rs":"983e6c1b1dec145acfa0c6a7ef8ff01d30507145753a1d85d0387c5ab61f6fa1"},"package":"c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946"}
1+
{"files":{"Cargo.toml":"8ec1aea0236e97817ede93c32ac56fcd04bf9cc561fa8a553ea329fa0fa639e2","LICENSE":"8bce3b45e49ecd1461f223b46de133d8f62cd39f745cfdaf81bee554b908bd42","README.md":"df67b984209ce474de5d60994983f6d2db0ac3b73bcfc2b1329871b0035c57e6","src/helpers/case_style.rs":"ac429454fad24d1a5a9829711f2024ae9477ffad7cc293b711fe588d1a5e1edf","src/helpers/inner_variant_props.rs":"09c4a2c73aadaaa934e6a20b429b99d4229ce76a4cc1edc916298100d971deb4","src/helpers/metadata.rs":"a9391071f1d4750781eda79bdf4553e77c65c28b1df87dfb3d00df6b290c18dd","src/helpers/mod.rs":"dc171dd27e723aede6c45cb981d48c710f42167afb06a5fbf013470a2962b9f2","src/helpers/type_props.rs":"cb1cdfb0e7927d3b0e364237e7048285ef5968e036d2ebacea642c66d96cc669","src/helpers/variant_props.rs":"36cc466e29b20246f87b9b87d39e4d23545596c522a201e0fb320ac2b231b045","src/lib.rs":"6b3d94635c078f4659500e31c3b682be6a64b5fb4b757e34d9aae3fa37afc10e","src/macros/enum_count.rs":"44084ab800ca8fca3b17f76c6025e8e59855598c0119807ce7bc80d5dc345d99","src/macros/enum_discriminants.rs":"98abbefad100dda4aaafa959ebb9fa77f518dd483414113e6c8bd1eea193bdff","src/macros/enum_is.rs":"cd63fb79f4f9b3479f11bce2ad45d3cb5d23f1d5c9c2a5fbb7af7e813fb70fa7","src/macros/enum_iter.rs":"462f949e7cb4ff3b7a7e30b723a3f86609e0e14c0f8e6b76e095376b0277396d","src/macros/enum_messages.rs":"ee89c3a10ebb553aa9c342f4b3b4346e97be1744fc5df72f580a331d4ea87393","src/macros/enum_properties.rs":"a9e1bf27504d46df689aad8910c7ad8ae7b3780ee97b6e659b2b19e481474030","src/macros/enum_table.rs":"434da77cbca12082d4daeba28ef0e416cea3064f1f641b31f4a330589369e04f","src/macros/enum_try_as.rs":"8bd311522786f0186290ea31a6f3483aa3fa23ccb3441b7fcf9b3743c9d3670b","src/macros/enum_variant_array.rs":"cb8de5cb5841fa9514c423c195b47a2fc13b9f5fb257093311fbb9c136c737d9","src/macros/enum_variant_names.rs":"ad4d2f87bf26e4d07327896118382a4b83c2cca5de6fdfecca6e7639eb73118b","src/macros/from_repr.rs":"561a6f10372c365674e064b31c6eb4c531ffa0b39f03476452bb0746201d579d","src/macros/mod.rs":"c94b29d4ad0f40a7803605d42647cc9fafec76545c7f3c435fe675a3102eb0ef","src/macros/strings/as_ref_str.rs":"594f29efd111ceef258ab0dd449db4cb52e638e1bd17efe589c5a90ee03686b9","src/macros/strings/display.rs":"5e466307196c428da9d31f8e7db46976a077d3e48805d93fa8a178563cc5b599","src/macros/strings/from_string.rs":"53d298f6859df3c13197a8bd303971d2a9ac14cb9860ea1e7c4df1bffdea58bd","src/macros/strings/mod.rs":"b7937f72a46c807fd87c787f3d23029509565a0388a30106e7026363782f2b56","src/macros/strings/to_string.rs":"983e6c1b1dec145acfa0c6a7ef8ff01d30507145753a1d85d0387c5ab61f6fa1"},"package":"4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"}

crates/strum_macros/Android.bp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rust_proc_macro {
1717
name: "libstrum_macros",
1818
crate_name: "strum_macros",
1919
cargo_env_compat: true,
20-
cargo_pkg_version: "0.26.2",
20+
cargo_pkg_version: "0.26.4",
2121
crate_root: "src/lib.rs",
2222
edition: "2018",
2323
rustlibs: [
@@ -34,7 +34,7 @@ rust_test_host {
3434
host_cross_supported: false,
3535
crate_name: "strum_macros",
3636
cargo_env_compat: true,
37-
cargo_pkg_version: "0.26.2",
37+
cargo_pkg_version: "0.26.4",
3838
crate_root: "src/lib.rs",
3939
test_suites: ["general-tests"],
4040
auto_gen_config: true,

crates/strum_macros/Cargo.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@
1212
[package]
1313
edition = "2018"
1414
name = "strum_macros"
15-
version = "0.26.2"
15+
version = "0.26.4"
1616
authors = ["Peter Glotfelty <[email protected]>"]
17+
build = false
18+
autobins = false
19+
autoexamples = false
20+
autotests = false
21+
autobenches = false
1722
description = "Helpful macros for working with enums and strings"
1823
homepage = "https://github.com/Peternator7/strum"
1924
documentation = "https://docs.rs/strum"
@@ -33,10 +38,11 @@ repository = "https://github.com/Peternator7/strum"
3338

3439
[lib]
3540
name = "strum_macros"
41+
path = "src/lib.rs"
3642
proc-macro = true
3743

3844
[dependencies.heck]
39-
version = "0.4.1"
45+
version = "0.5.0"
4046

4147
[dependencies.proc-macro2]
4248
version = "1.0"

crates/strum_macros/METADATA

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: "strum_macros"
22
description: "Helpful macros for working with enums and strings"
33
third_party {
4-
version: "0.26.2"
4+
version: "0.26.4"
55
license_type: NOTICE
66
last_upgrade_date {
7-
year: 2024
8-
month: 12
7+
year: 2025
8+
month: 2
99
day: 20
1010
}
1111
homepage: "https://crates.io/crates/strum_macros"
1212
identifier {
1313
type: "Archive"
14-
value: "https://static.crates.io/crates/strum_macros/strum_macros-0.26.2.crate"
15-
version: "0.26.2"
14+
value: "https://static.crates.io/crates/strum_macros/strum_macros-0.26.4.crate"
15+
version: "0.26.4"
1616
}
1717
}

crates/strum_macros/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ Strumming is also a very whimsical motion, much like writing Rust code.
8383
[EnumDiscriminants]: https://docs.rs/strum_macros/latest/strum_macros/derive.EnumDiscriminants.html
8484
[EnumCount]: https://docs.rs/strum_macros/latest/strum_macros/derive.EnumCount.html
8585
[FromRepr]: https://docs.rs/strum_macros/latest/strum_macros/derive.FromRepr.html
86-
[VariantArray]: https://docs.rs/strum_macros/latest/strum_macros/derive.StaticVariantsArray.html
87-
[VariantNames]: https://docs.rs/strum_macros/latest/strum_macros/derive.EnumVariantNames.html
86+
[VariantArray]: https://docs.rs/strum_macros/latest/strum_macros/derive.VariantArray.html
87+
[VariantNames]: https://docs.rs/strum_macros/latest/strum_macros/derive.VariantNames.html
8888
[EnumTable]: https://docs.rs/strum_macros/latest/strum_macros/derive.EnumTable.html

crates/strum_macros/src/lib.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
//! Strum is a set of macros and traits for working with
44
//! enums and strings easier in Rust.
55
//!
6+
//! This crate only contains derive macros for use with the
7+
//! [`strum`](https://docs.rs/strum)
8+
//! crate. The macros provied by this crate are also available by
9+
//! enabling the `derive` feature in aforementioned `strum` crate.
610
711
#![recursion_limit = "128"]
812

@@ -367,14 +371,16 @@ pub fn to_string(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
367371
/// 3. The name of the variant will be used if there are no `serialize` or `to_string` attributes.
368372
/// 4. If the enum has a `strum(prefix = "some_value_")`, every variant will have that prefix prepended
369373
/// to the serialization.
370-
/// 5. Enums with named fields support named field interpolation. The value will be interpolated into the output string.
374+
/// 5. Enums with fields support string interpolation.
371375
/// Note this means the variant will not "round trip" if you then deserialize the string.
372376
///
373377
/// ```rust
374378
/// #[derive(strum_macros::Display)]
375379
/// pub enum Color {
376380
/// #[strum(to_string = "saturation is {sat}")]
377381
/// Red { sat: usize },
382+
/// #[strum(to_string = "hue is {1}, saturation is {0}")]
383+
/// Blue(usize, usize),
378384
/// }
379385
/// ```
380386
///
@@ -426,7 +432,7 @@ pub fn display(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
426432
/// Creates a new type that iterates of the variants of an enum.
427433
///
428434
/// Iterate over the variants of an Enum. Any additional data on your variants will be set to `Default::default()`.
429-
/// The macro implements `strum::IntoEnumIterator` on your enum and creates a new type called `YourEnumIter` that is the iterator object.
435+
/// The macro implements [`strum::IntoEnumIterator`](https://docs.rs/strum/latest/strum/trait.IntoEnumIterator.html) on your enum and creates a new type called `YourEnumIter` that is the iterator object.
430436
/// You cannot derive `EnumIter` on any type with a lifetime bound (`<'a>`) because the iterator would surely
431437
/// create [unbounded lifetimes](https://doc.rust-lang.org/nightly/nomicon/unbounded-lifetimes.html).
432438
///
@@ -588,7 +594,7 @@ pub fn enum_table(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
588594
/// data. The discriminant follows the same rules as `rustc`. The first discriminant is zero and each
589595
/// successive variant has a discriminant of one greater than the previous variant, except where an
590596
/// explicit discriminant is specified. The type of the discriminant will match the `repr` type if
591-
/// it is specifed.
597+
/// it is specified.
592598
///
593599
/// When the macro is applied using rustc >= 1.46 and when there is no additional data on any of
594600
/// the variants, the `from_repr` function is marked `const`. rustc >= 1.46 is required
@@ -668,7 +674,7 @@ pub fn from_repr(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
668674
///
669675
/// Encode strings into the enum itself. The `strum_macros::EmumMessage` macro implements the `strum::EnumMessage` trait.
670676
/// `EnumMessage` looks for `#[strum(message="...")]` attributes on your variants.
671-
/// You can also provided a `detailed_message="..."` attribute to create a seperate more detailed message than the first.
677+
/// You can also provided a `detailed_message="..."` attribute to create a separate more detailed message than the first.
672678
///
673679
/// `EnumMessage` also exposes the variants doc comments through `get_documentation()`. This is useful in some scenarios,
674680
/// but `get_message` should generally be preferred. Rust doc comments are intended for developer facing documentation,
@@ -754,7 +760,7 @@ pub fn enum_messages(input: proc_macro::TokenStream) -> proc_macro::TokenStream
754760

755761
/// Add custom properties to enum variants.
756762
///
757-
/// Enables the encoding of arbitary constants into enum variants. This method
763+
/// Enables the encoding of arbitrary constants into enum variants. This method
758764
/// currently only supports adding additional string values. Other types of literals are still
759765
/// experimental in the rustc compiler. The generated code works by nesting match statements.
760766
/// The first match statement matches on the type of the enum, and the inner match statement

crates/strum_macros/src/macros/enum_iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
131131
::core::option::Option::None
132132
} else {
133133
self.idx = idx;
134-
self.get(idx - 1)
134+
#iter_name::get(self, idx - 1)
135135
}
136136
}
137137
}
@@ -154,7 +154,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
154154
::core::option::Option::None
155155
} else {
156156
self.back_idx = back_idx;
157-
self.get(#variant_count - self.back_idx)
157+
#iter_name::get(self, #variant_count - self.back_idx)
158158
}
159159
}
160160
}

0 commit comments

Comments
 (0)