From 834538300dc3baa39be4239ae728e86655987df9 Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Mon, 18 Aug 2025 18:02:41 +0200 Subject: [PATCH] Migrate to strum 0.27.2 --- Cargo.lock | 76 +++++++++---------- Cargo.toml | 8 +- common/credentials-interface/Cargo.toml | 1 + common/credentials-interface/src/lib.rs | 6 +- common/nymnoise/Cargo.toml | 1 + common/nymnoise/src/config.rs | 2 +- common/nymnoise/src/stream/framing.rs | 2 +- common/statistics/Cargo.toml | 1 + common/statistics/src/types.rs | 4 +- common/types/Cargo.toml | 1 + common/types/src/currency.rs | 2 +- nym-node/nym-node-requests/Cargo.toml | 1 + .../src/api/v1/node_load/models.rs | 2 +- nym-wallet/nym-wallet-types/Cargo.toml | 7 +- nym-wallet/nym-wallet-types/src/network.rs | 2 +- nym-wallet/src-tauri/Cargo.toml | 2 +- 16 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0150ee1bdc..6e4b12572e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3249,15 +3249,6 @@ dependencies = [ "http 1.3.1", ] -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.1" @@ -5586,8 +5577,8 @@ dependencies = [ "serde", "serde_json", "sqlx", - "strum 0.26.3", - "strum_macros 0.26.4", + "strum 0.27.2", + "strum_macros 0.27.2", "tempfile", "thiserror 2.0.12", "time", @@ -5719,7 +5710,8 @@ dependencies = [ "nym-network-defaults 0.1.0", "rand 0.8.5", "serde", - "strum 0.26.3", + "strum 0.27.2", + "strum_macros 0.27.2", "thiserror 2.0.12", "time", "utoipa", @@ -6052,7 +6044,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "strum 0.26.3", + "strum 0.27.2", "subtle 2.6.1", "thiserror 2.0.12", "time", @@ -6071,7 +6063,7 @@ dependencies = [ "nym-sphinx 0.1.0", "nym-statistics-common 0.1.0", "sqlx", - "strum 0.26.3", + "strum 0.27.2", "thiserror 2.0.12", "time", "tokio", @@ -6677,7 +6669,7 @@ dependencies = [ "futures", "nym-metrics 0.1.0", "nym-statistics-common 0.1.0", - "strum 0.26.3", + "strum 0.27.2", "time", "tokio", "tracing", @@ -6701,7 +6693,8 @@ dependencies = [ "schemars 0.8.22", "serde", "serde_json", - "strum 0.26.3", + "strum 0.27.2", + "strum_macros 0.27.2", "thiserror 2.0.12", "time", "tokio", @@ -6787,8 +6780,8 @@ dependencies = [ "serde_json", "serde_json_path", "sqlx", - "strum 0.26.3", - "strum_macros 0.26.4", + "strum 0.27.2", + "strum_macros 0.27.2", "thiserror 2.0.12", "time", "tokio", @@ -6871,7 +6864,8 @@ dependencies = [ "rand_chacha 0.3.1", "sha2 0.10.9", "snow", - "strum 0.26.3", + "strum 0.27.2", + "strum_macros 0.27.2", "thiserror 2.0.12", "tokio", "tokio-util", @@ -7581,7 +7575,8 @@ dependencies = [ "serde_json", "sha2 0.10.9", "si-scale", - "strum 0.26.3", + "strum 0.27.2", + "strum_macros 0.27.2", "sysinfo", "thiserror 2.0.12", "time", @@ -7769,7 +7764,8 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.9", - "strum 0.26.3", + "strum 0.27.2", + "strum_macros 0.27.2", "tempfile", "thiserror 2.0.12", "ts-rs", @@ -8005,7 +8001,8 @@ dependencies = [ "nym-vesting-contract-common 0.7.0", "serde", "serde_json", - "strum 0.23.0", + "strum 0.27.2", + "strum_macros 0.27.2", "ts-rs", ] @@ -10572,15 +10569,6 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "strum" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" -dependencies = [ - "strum_macros 0.23.1", -] - [[package]] name = "strum" version = "0.26.3" @@ -10591,16 +10579,12 @@ dependencies = [ ] [[package]] -name = "strum_macros" -version = "0.23.1" +name = "strum" +version = "0.27.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", + "strum_macros 0.27.2", ] [[package]] @@ -10616,6 +10600,18 @@ dependencies = [ "syn 2.0.104", ] +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.104", +] + [[package]] name = "subtle" version = "1.0.0" @@ -12022,7 +12018,7 @@ dependencies = [ "nym-validator-client 0.1.0", "serde", "serde_json", - "strum 0.26.3", + "strum 0.27.2", "time", "tokio", "tracing", diff --git a/Cargo.toml b/Cargo.toml index 1bee069b76..3c6143e725 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,7 +102,8 @@ members = [ "common/wasm/storage", "common/wasm/utils", "common/wireguard", - "common/wireguard-types", "common/zulip-client", + "common/wireguard-types", + "common/zulip-client", "documentation/autodoc", "gateway", "nym-api", @@ -320,8 +321,8 @@ si-scale = "0.2.3" snow = "0.9.6" sphinx-packet = "=0.6.0" sqlx = "0.8.6" -strum = "0.26" -strum_macros = "0.26" +strum = "0.27.2" +strum_macros = "0.27.2" subtle-encoding = "0.5" syn = "1" sysinfo = "0.33.0" @@ -450,4 +451,3 @@ exit = "deny" panic = "deny" unimplemented = "deny" unreachable = "deny" - diff --git a/common/credentials-interface/Cargo.toml b/common/credentials-interface/Cargo.toml index f7f957d68b..d6d4ce842b 100644 --- a/common/credentials-interface/Cargo.toml +++ b/common/credentials-interface/Cargo.toml @@ -15,6 +15,7 @@ bls12_381 = { workspace = true, default-features = false } serde = { workspace = true, features = ["derive"] } thiserror = { workspace = true } strum = { workspace = true, features = ["derive"] } +strum_macros = { workspace = true } time = { workspace = true, features = ["serde"] } utoipa = { workspace = true } rand = { workspace = true } diff --git a/common/credentials-interface/src/lib.rs b/common/credentials-interface/src/lib.rs index cf1b138677..9653a3a72d 100644 --- a/common/credentials-interface/src/lib.rs +++ b/common/credentials-interface/src/lib.rs @@ -229,9 +229,9 @@ impl From for NymPayInfo { Serialize, Deserialize, Hash, - strum::Display, - strum::EnumString, - strum::EnumIter, + strum_macros::Display, + strum_macros::EnumString, + strum_macros::EnumIter, )] #[serde(rename_all = "kebab-case")] #[strum(serialize_all = "kebab-case")] diff --git a/common/nymnoise/Cargo.toml b/common/nymnoise/Cargo.toml index eead4a60f5..4b29e88eed 100644 --- a/common/nymnoise/Cargo.toml +++ b/common/nymnoise/Cargo.toml @@ -14,6 +14,7 @@ pin-project = { workspace = true } sha2 = { workspace = true } snow = { workspace = true } strum = { workspace = true, features = ["derive"] } +strum_macros = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["net", "io-util", "time"] } tokio-util = { workspace = true, features = ["codec"] } diff --git a/common/nymnoise/src/config.rs b/common/nymnoise/src/config.rs index 94a25cf786..6f5e087d6c 100644 --- a/common/nymnoise/src/config.rs +++ b/common/nymnoise/src/config.rs @@ -13,7 +13,7 @@ use nym_crypto::asymmetric::x25519; use nym_noise_keys::{NoiseVersion, VersionedNoiseKey}; use snow::params::NoiseParams; -use strum::{EnumIter, FromRepr}; +use strum_macros::{EnumIter, FromRepr}; #[derive(Default, Debug, Clone, Copy, EnumIter, FromRepr, Eq, PartialEq)] #[repr(u8)] diff --git a/common/nymnoise/src/stream/framing.rs b/common/nymnoise/src/stream/framing.rs index c0ebcf0917..8c51daa39a 100644 --- a/common/nymnoise/src/stream/framing.rs +++ b/common/nymnoise/src/stream/framing.rs @@ -5,7 +5,7 @@ use crate::config::NoisePattern; use crate::error::NoiseError; use bytes::{Buf, BufMut, Bytes, BytesMut}; use nym_noise_keys::NoiseVersion; -use strum::FromRepr; +use strum_macros::FromRepr; #[derive(Debug)] pub struct NymNoiseFrame { diff --git a/common/statistics/Cargo.toml b/common/statistics/Cargo.toml index 1bbd7317c3..18a8ca8fc9 100644 --- a/common/statistics/Cargo.toml +++ b/common/statistics/Cargo.toml @@ -21,6 +21,7 @@ time = { workspace = true } tokio = { workspace = true } si-scale = { workspace = true } strum = { workspace = true } +strum_macros = { workspace = true } nym-crypto = { path = "../crypto" } nym-sphinx = { path = "../nymsphinx" } diff --git a/common/statistics/src/types.rs b/common/statistics/src/types.rs index dce345c9d8..127738c1cd 100644 --- a/common/statistics/src/types.rs +++ b/common/statistics/src/types.rs @@ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; PartialEq, Copy, Clone, - strum::Display, - strum::EnumString, + strum_macros::Display, + strum_macros::EnumString, Serialize, Deserialize, Default, diff --git a/common/types/Cargo.toml b/common/types/Cargo.toml index 6ca8a3d9e4..620ec264d1 100644 --- a/common/types/Cargo.toml +++ b/common/types/Cargo.toml @@ -19,6 +19,7 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } sha2 = { workspace = true } strum = { workspace = true, features = ["derive"] } +strum_macros = { workspace = true } thiserror = { workspace = true } ts-rs = { workspace = true } url = { workspace = true } diff --git a/common/types/src/currency.rs b/common/types/src/currency.rs index 9d13bfbc56..0810f278de 100644 --- a/common/types/src/currency.rs +++ b/common/types/src/currency.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize}; use std::cmp::Ordering; use std::collections::HashMap; use std::fmt::{Display, Formatter}; -use strum::{Display, EnumString, VariantNames}; +use strum_macros::{Display, EnumString, VariantNames}; #[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))] #[cfg_attr( diff --git a/nym-node/nym-node-requests/Cargo.toml b/nym-node/nym-node-requests/Cargo.toml index 0d1628f34b..82119f47c8 100644 --- a/nym-node/nym-node-requests/Cargo.toml +++ b/nym-node/nym-node-requests/Cargo.toml @@ -18,6 +18,7 @@ schemars = { workspace = true, features = ["preserve_order"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } strum = { workspace = true, features = ["derive"] } +strum_macros = { workspace = true } time = { workspace = true, features = ["serde", "formatting", "parsing"] } thiserror = { workspace = true } diff --git a/nym-node/nym-node-requests/src/api/v1/node_load/models.rs b/nym-node/nym-node-requests/src/api/v1/node_load/models.rs index ecbca83eeb..b4b1f0ad84 100644 --- a/nym-node/nym-node-requests/src/api/v1/node_load/models.rs +++ b/nym-node/nym-node-requests/src/api/v1/node_load/models.rs @@ -3,7 +3,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use strum::{Display, EnumString}; +use strum_macros::{Display, EnumString}; #[derive( Display, diff --git a/nym-wallet/nym-wallet-types/Cargo.toml b/nym-wallet/nym-wallet-types/Cargo.toml index 83522fa191..d29f2467dd 100644 --- a/nym-wallet/nym-wallet-types/Cargo.toml +++ b/nym-wallet/nym-wallet-types/Cargo.toml @@ -9,7 +9,9 @@ license = "Apache-2.0" hex-literal = "0.3.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -strum = { version = "0.23", features = ["derive"] } +strum = { version = "0.27.2", features = ["derive"] } +strum_macros = "0.27.2" + ts-rs = "10.0.0" cosmwasm-std = "2.2.1" @@ -26,6 +28,3 @@ nym-types = { path = "../../common/types" } [features] default = [] generate-ts = ["nym-mixnet-contract-common/generate-ts", "nym-types/generate-ts"] - - - diff --git a/nym-wallet/nym-wallet-types/src/network.rs b/nym-wallet/nym-wallet-types/src/network.rs index 7da9efa4f3..b01c3768e3 100644 --- a/nym-wallet/nym-wallet-types/src/network.rs +++ b/nym-wallet/nym-wallet-types/src/network.rs @@ -5,7 +5,7 @@ use nym_config::defaults::{mainnet, DenomDetails, NymNetworkDetails}; use nym_types::{currency::DecCoin, error::TypesError}; use serde::{Deserialize, Serialize}; use std::{fmt, ops::Not, str::FromStr}; -use strum::EnumIter; +use strum_macros::EnumIter; mod sandbox; diff --git a/nym-wallet/src-tauri/Cargo.toml b/nym-wallet/src-tauri/Cargo.toml index 52cbac1d9e..7ea924a9e8 100644 --- a/nym-wallet/src-tauri/Cargo.toml +++ b/nym-wallet/src-tauri/Cargo.toml @@ -39,7 +39,7 @@ reqwest = { version = "0.12.4", features = ["json"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_repr = "0.1" -strum = { version = "0.23", features = ["derive"] } +strum = { version = "0.27.2", features = ["derive"] } tap = "1" tauri = { version = "2", features = [] } #tendermint-rpc = "0.23.0"