Remove dep leak of strum iterator (#6522)

strum iterator over an enum leaks the version needed to iterate over it,
which can cause problems to dependent crates that use a different strum
version.

While at it, bump the strum crates as well
This commit is contained in:
Bogdan-Ștefan Neacşu
2026-03-06 10:44:14 +02:00
committed by GitHub
parent a2c489dc5b
commit ba0625cd97
3 changed files with 57 additions and 31 deletions
Generated
+50 -29
View File
@@ -5458,8 +5458,8 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.10.9",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"tendermint",
"tendermint-rpc",
"thiserror 2.0.12",
@@ -5519,7 +5519,7 @@ dependencies = [
"semver 1.0.26",
"serde",
"sha2 0.10.9",
"strum_macros",
"strum_macros 0.28.0",
"thiserror 2.0.12",
"tracing",
"x25519-dalek",
@@ -6015,8 +6015,8 @@ dependencies = [
"serde",
"serde_json",
"sqlx",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"tempfile",
"thiserror 2.0.12",
"time",
@@ -6056,8 +6056,8 @@ dependencies = [
"serde",
"serde_json",
"sqlx",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"tempfile",
"thiserror 2.0.12",
"time",
@@ -6197,8 +6197,8 @@ dependencies = [
"nym-upgrade-mode-check",
"rand 0.8.5",
"serde",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"thiserror 2.0.12",
"time",
"utoipa",
@@ -6553,7 +6553,7 @@ dependencies = [
"rand 0.8.5",
"serde",
"serde_json",
"strum",
"strum 0.28.0",
"subtle 2.6.1",
"thiserror 2.0.12",
"time",
@@ -6573,7 +6573,7 @@ dependencies = [
"nym-sphinx",
"nym-statistics-common",
"sqlx",
"strum",
"strum 0.28.0",
"thiserror 2.0.12",
"time",
"tokio",
@@ -6835,7 +6835,7 @@ dependencies = [
"nym-pemstore",
"rand 0.9.2",
"rand_chacha 0.9.0",
"strum",
"strum 0.28.0",
"thiserror 2.0.12",
"zeroize",
]
@@ -6848,8 +6848,8 @@ dependencies = [
"libcrux-sha3",
"num_enum",
"semver 1.0.26",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"thiserror 2.0.12",
]
@@ -7227,7 +7227,7 @@ dependencies = [
"futures",
"nym-metrics",
"nym-statistics-common",
"strum",
"strum 0.28.0",
"time",
"tokio",
"tracing",
@@ -7252,8 +7252,8 @@ dependencies = [
"schemars 0.8.22",
"serde",
"serde_json",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"thiserror 2.0.12",
"time",
"tokio",
@@ -7324,8 +7324,8 @@ dependencies = [
"serde_json",
"serde_json_path",
"sqlx",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"thiserror 2.0.12",
"time",
"tokio",
@@ -7412,8 +7412,8 @@ dependencies = [
"rand_chacha 0.3.1",
"sha2 0.10.9",
"snow",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"thiserror 2.0.12",
"tokio",
"tokio-util",
@@ -7989,8 +7989,8 @@ dependencies = [
"serde_json",
"sha2 0.10.9",
"si-scale",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"sysinfo",
"thiserror 2.0.12",
"time",
@@ -8117,8 +8117,8 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.10.9",
"strum",
"strum_macros",
"strum 0.28.0",
"strum_macros 0.28.0",
"tempfile",
"thiserror 2.0.12",
"ts-rs",
@@ -8289,8 +8289,8 @@ dependencies = [
"nym-vesting-contract-common",
"serde",
"serde_json",
"strum",
"strum_macros",
"strum 0.27.2",
"strum_macros 0.27.2",
"ts-rs",
]
@@ -11157,7 +11157,16 @@ version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
dependencies = [
"strum_macros",
"strum_macros 0.27.2",
]
[[package]]
name = "strum"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd"
dependencies = [
"strum_macros 0.28.0",
]
[[package]]
@@ -11172,6 +11181,18 @@ dependencies = [
"syn 2.0.106",
]
[[package]]
name = "strum_macros"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664"
dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.106",
]
[[package]]
name = "subtle"
version = "1.0.0"
@@ -12823,7 +12844,7 @@ dependencies = [
"nym-validator-client",
"serde",
"serde_json",
"strum",
"strum 0.28.0",
"time",
"tokio",
"tracing",
+2 -2
View File
@@ -347,8 +347,8 @@ si-scale = "0.2.3"
snow = "0.9.6"
sphinx-packet = "=0.6.0"
sqlx = "0.8.6"
strum = "0.27.2"
strum_macros = "0.27.2"
strum = "0.28.0"
strum_macros = "0.28.0"
subtle-encoding = "0.5"
syn = "2"
sysinfo = "0.37.0"
+5
View File
@@ -4,6 +4,7 @@
use rand::Rng;
use serde::{Deserialize, Serialize};
use std::fmt::Debug;
use strum::IntoEnumIterator as _;
use thiserror::Error;
use time::{Date, OffsetDateTime};
@@ -315,6 +316,10 @@ impl TicketType {
_ => Err(UnknownTicketType),
}
}
pub fn exposed_iter() -> impl Iterator<Item = TicketType> {
TicketType::iter()
}
}
impl From<TicketType> for TicketTypeRepr {