Bump strum from 0.22 -> 0.23 (#10758)

This commit is contained in:
Alexander Theißen
2022-01-31 21:04:12 +01:00
committed by GitHub
parent f3168c3fa0
commit 0bfbf5a89f
5 changed files with 14 additions and 34 deletions
+5 -27
View File
@@ -508,7 +508,7 @@ dependencies = [
"sp-keystore", "sp-keystore",
"sp-runtime", "sp-runtime",
"sp-tracing", "sp-tracing",
"strum 0.22.0", "strum",
"substrate-prometheus-endpoint", "substrate-prometheus-endpoint",
"thiserror", "thiserror",
"wasm-timer", "wasm-timer",
@@ -5710,8 +5710,7 @@ dependencies = [
"sp-std", "sp-std",
"sp-tracing", "sp-tracing",
"static_assertions", "static_assertions",
"strum 0.22.0", "strum",
"strum_macros 0.23.1",
] ]
[[package]] [[package]]
@@ -9742,7 +9741,7 @@ dependencies = [
"lazy_static", "lazy_static",
"sp-core", "sp-core",
"sp-runtime", "sp-runtime",
"strum 0.22.0", "strum",
] ]
[[package]] [[package]]
@@ -10210,34 +10209,13 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "strum"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e"
dependencies = [
"strum_macros 0.22.0",
]
[[package]] [[package]]
name = "strum" name = "strum"
version = "0.23.0" version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb"
dependencies = [ dependencies = [
"strum_macros 0.23.1", "strum_macros",
]
[[package]]
name = "strum_macros"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb"
dependencies = [
"heck 0.3.2",
"proc-macro2",
"quote",
"syn",
] ]
[[package]] [[package]]
@@ -10488,7 +10466,7 @@ dependencies = [
"build-helper", "build-helper",
"cargo_metadata", "cargo_metadata",
"sp-maybe-compressed-blob", "sp-maybe-compressed-blob",
"strum 0.23.0", "strum",
"tempfile", "tempfile",
"toml", "toml",
"walkdir", "walkdir",
+1 -1
View File
@@ -39,4 +39,4 @@ beefy-primitives = { version = "4.0.0-dev", path = "../../primitives/beefy" }
sp-tracing = { version = "4.0.0", path = "../../primitives/tracing" } sp-tracing = { version = "4.0.0", path = "../../primitives/tracing" }
sc-network-test = { version = "0.8.0", path = "../network/test" } sc-network-test = { version = "0.8.0", path = "../network/test" }
strum = { version = "0.22", features = ["derive"] } strum = { version = "0.23", features = ["derive"] }
@@ -37,8 +37,7 @@ rand = { version = "0.7.3", default-features = false, optional = true, features
"alloc", "alloc",
"small_rng", "small_rng",
] } ] }
strum = { optional = true, version = "0.22.0" } strum = { optional = true, default-features = false, version = "0.23.0", features = ["derive"] }
strum_macros = { optional = true, version = "0.23.1" }
[dev-dependencies] [dev-dependencies]
parking_lot = "0.11.2" parking_lot = "0.11.2"
@@ -70,12 +69,15 @@ std = [
"sp-arithmetic/std", "sp-arithmetic/std",
"frame-election-provider-support/std", "frame-election-provider-support/std",
"log/std", "log/std",
"frame-benchmarking/std",
"rand/std",
"strum/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks", "frame-election-provider-support/runtime-benchmarks",
"rand", "rand",
"strum", "strum",
"strum_macros",
] ]
try-runtime = ["frame-support/try-runtime"] try-runtime = ["frame-support/try-runtime"]
@@ -488,7 +488,7 @@ pub struct SolutionOrSnapshotSize {
/// ///
/// Note that this is different from [`pallet::Error`]. /// Note that this is different from [`pallet::Error`].
#[derive(frame_support::DebugNoBound)] #[derive(frame_support::DebugNoBound)]
#[cfg_attr(feature = "runtime-benchmarks", derive(strum_macros::IntoStaticStr))] #[cfg_attr(feature = "runtime-benchmarks", derive(strum::IntoStaticStr))]
pub enum ElectionError<T: Config> { pub enum ElectionError<T: Config> {
/// An error happened in the feasibility check sub-system. /// An error happened in the feasibility check sub-system.
Feasibility(FeasibilityError), Feasibility(FeasibilityError),
@@ -533,7 +533,7 @@ impl<T: Config> From<unsigned::MinerError<T>> for ElectionError<T> {
/// Errors that can happen in the feasibility check. /// Errors that can happen in the feasibility check.
#[derive(Debug, Eq, PartialEq)] #[derive(Debug, Eq, PartialEq)]
#[cfg_attr(feature = "runtime-benchmarks", derive(strum_macros::IntoStaticStr))] #[cfg_attr(feature = "runtime-benchmarks", derive(strum::IntoStaticStr))]
pub enum FeasibilityError { pub enum FeasibilityError {
/// Wrong number of winners presented. /// Wrong number of winners presented.
WrongWinnerCount, WrongWinnerCount,
+1 -1
View File
@@ -18,4 +18,4 @@ targets = ["x86_64-unknown-linux-gnu"]
sp-core = { version = "4.1.0-dev", path = "../core" } sp-core = { version = "4.1.0-dev", path = "../core" }
sp-runtime = { version = "4.1.0-dev", path = "../runtime" } sp-runtime = { version = "4.1.0-dev", path = "../runtime" }
lazy_static = "1.4.0" lazy_static = "1.4.0"
strum = { version = "0.22.0", features = ["derive"] } strum = { version = "0.23.0", features = ["derive"] }