From 95baa840e37855af62a2097ce6fb4a88fcdbf97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Tue, 9 Feb 2021 12:37:45 +0100 Subject: [PATCH] Switch to latest `impl-trait-for-tuples` Switches to the latest version everywhere now, as I fixed the problems in the crate ;) --- Cargo.lock | 39 +++++++++---------------- client/chain-spec/Cargo.toml | 2 +- frame/authorship/Cargo.toml | 2 +- frame/session/Cargo.toml | 2 +- frame/session/src/lib.rs | 4 +-- frame/support/Cargo.toml | 2 +- frame/system/Cargo.toml | 2 +- frame/timestamp/Cargo.toml | 2 +- frame/treasury/Cargo.toml | 2 +- primitives/runtime-interface/Cargo.toml | 2 +- primitives/runtime/Cargo.toml | 2 +- primitives/timestamp/Cargo.toml | 2 +- primitives/wasm-interface/Cargo.toml | 2 +- 13 files changed, 26 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d4bafddb7bd97..587d9af1a2131 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1736,7 +1736,7 @@ dependencies = [ "frame-metadata", "frame-support-procedural", "frame-system", - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "log", "once_cell", "parity-scale-codec", @@ -1815,7 +1815,7 @@ version = "2.0.1" dependencies = [ "criterion", "frame-support", - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-scale-codec", "serde", "sp-core", @@ -2562,20 +2562,9 @@ dependencies = [ [[package]] name = "impl-trait-for-tuples" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f65a8ecf74feeacdab8d38cb129e550ca871cccaa7d1921d8636ecd75534903" +checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" dependencies = [ "proc-macro2", "quote", @@ -4476,7 +4465,7 @@ version = "2.0.1" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-scale-codec", "serde", "sp-authorship", @@ -5065,7 +5054,7 @@ version = "2.0.1" dependencies = [ "frame-support", "frame-system", - "impl-trait-for-tuples 0.1.3", + "impl-trait-for-tuples", "lazy_static", "pallet-timestamp", "parity-scale-codec", @@ -5215,7 +5204,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-scale-codec", "serde", "sp-core", @@ -5295,7 +5284,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "pallet-balances", "parity-scale-codec", "serde", @@ -5433,7 +5422,7 @@ checksum = "664a8c6b8e62d8f9f2f937e391982eb433ab285b4cd9545b342441e04a906e42" dependencies = [ "cfg-if 1.0.0", "hashbrown", - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-util-mem-derive", "parking_lot 0.11.1", "primitive-types", @@ -6625,7 +6614,7 @@ dependencies = [ name = "sc-chain-spec" version = "2.0.1" dependencies = [ - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-scale-codec", "sc-chain-spec-derive", "sc-consensus-babe", @@ -8623,7 +8612,7 @@ version = "2.0.1" dependencies = [ "either", "hash256-std-hasher", - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "log", "parity-scale-codec", "parity-util-mem", @@ -8643,7 +8632,7 @@ dependencies = [ name = "sp-runtime-interface" version = "2.0.1" dependencies = [ - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", "rustversion", @@ -8822,7 +8811,7 @@ dependencies = [ name = "sp-timestamp" version = "2.0.1" dependencies = [ - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-scale-codec", "sp-api", "sp-inherents", @@ -8902,7 +8891,7 @@ dependencies = [ name = "sp-wasm-interface" version = "2.0.1" dependencies = [ - "impl-trait-for-tuples 0.2.0", + "impl-trait-for-tuples", "parity-scale-codec", "sp-std", "wasmi", diff --git a/client/chain-spec/Cargo.toml b/client/chain-spec/Cargo.toml index 3903ebf21d5d2..0b482bb2ed3fd 100644 --- a/client/chain-spec/Cargo.toml +++ b/client/chain-spec/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] sc-chain-spec-derive = { version = "2.0.0", path = "./derive" } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" sc-network = { version = "0.8.0", path = "../network" } sp-core = { version = "2.0.0", path = "../../primitives/core" } serde = { version = "1.0.101", features = ["derive"] } diff --git a/frame/authorship/Cargo.toml b/frame/authorship/Cargo.toml index 04c95d02a6435..4489ee7391035 100644 --- a/frame/authorship/Cargo.toml +++ b/frame/authorship/Cargo.toml @@ -20,7 +20,7 @@ sp-std = { version = "2.0.0", default-features = false, path = "../../primitives sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" [dev-dependencies] sp-core = { version = "2.0.0", path = "../../primitives/core" } diff --git a/frame/session/Cargo.toml b/frame/session/Cargo.toml index 8a13f905f0dc0..6f42663ecd1c1 100644 --- a/frame/session/Cargo.toml +++ b/frame/session/Cargo.toml @@ -25,7 +25,7 @@ frame-support = { version = "2.0.0", default-features = false, path = "../suppor frame-system = { version = "2.0.0", default-features = false, path = "../system" } pallet-timestamp = { version = "2.0.0", default-features = false, path = "../timestamp" } sp-trie = { version = "2.0.0", optional = true, default-features = false, path = "../../primitives/trie" } -impl-trait-for-tuples = "0.1" +impl-trait-for-tuples = "0.2.1" [dev-dependencies] sp-application-crypto = { version = "2.0.0", path = "../../primitives/application-crypto" } diff --git a/frame/session/src/lib.rs b/frame/session/src/lib.rs index 0793d5e74b988..64ec31ad99d07 100644 --- a/frame/session/src/lib.rs +++ b/frame/session/src/lib.rs @@ -258,10 +258,8 @@ pub trait SessionHandler { } #[impl_trait_for_tuples::impl_for_tuples(1, 30)] -#[tuple_types_no_default_trait_bound] +#[tuple_types_custom_trait_bound(OneSessionHandler)] impl SessionHandler for Tuple { - for_tuples!( where #( Tuple: OneSessionHandler )* ); - for_tuples!( const KEY_TYPE_IDS: &'static [KeyTypeId] = &[ #( ::ID ),* ]; ); diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index c37da41c34834..7e9de8587c622 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -30,7 +30,7 @@ paste = "1.0" once_cell = { version = "1", default-features = false, optional = true } sp-state-machine = { version = "0.8.0", optional = true, path = "../../primitives/state-machine" } bitflags = "1.2" -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" smallvec = "1.4.1" [dev-dependencies] diff --git a/frame/system/Cargo.toml b/frame/system/Cargo.toml index 0866a0c1d0b64..60ef5a27f4872 100644 --- a/frame/system/Cargo.toml +++ b/frame/system/Cargo.toml @@ -21,7 +21,7 @@ sp-io = { version = "2.0.0", path = "../../primitives/io", default-features = fa sp-runtime = { version = "2.0.0", default-features = false, path = "../../primitives/runtime" } sp-version = { version = "2.0.0", default-features = false, path = "../../primitives/version" } frame-support = { version = "2.0.1", default-features = false, path = "../support" } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" [dev-dependencies] criterion = "0.3.3" diff --git a/frame/timestamp/Cargo.toml b/frame/timestamp/Cargo.toml index 2e71d09f2c203..93dc4b4d41ca5 100644 --- a/frame/timestamp/Cargo.toml +++ b/frame/timestamp/Cargo.toml @@ -25,7 +25,7 @@ frame-benchmarking = { version = "2.0.0", default-features = false, path = "../b frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } sp-timestamp = { version = "2.0.0", default-features = false, path = "../../primitives/timestamp" } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" [dev-dependencies] sp-io ={ version = "2.0.0", path = "../../primitives/io" } diff --git a/frame/treasury/Cargo.toml b/frame/treasury/Cargo.toml index dd3bd9bb10907..556d77418da6d 100644 --- a/frame/treasury/Cargo.toml +++ b/frame/treasury/Cargo.toml @@ -20,7 +20,7 @@ sp-runtime = { version = "2.0.0", default-features = false, path = "../../primit frame-support = { version = "2.0.0", default-features = false, path = "../support" } frame-system = { version = "2.0.0", default-features = false, path = "../system" } pallet-balances = { version = "2.0.0", default-features = false, path = "../balances" } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" frame-benchmarking = { version = "2.0.0", default-features = false, path = "../benchmarking", optional = true } diff --git a/primitives/runtime-interface/Cargo.toml b/primitives/runtime-interface/Cargo.toml index bbd33d344fbd5..ccbcd470998b8 100644 --- a/primitives/runtime-interface/Cargo.toml +++ b/primitives/runtime-interface/Cargo.toml @@ -23,7 +23,7 @@ codec = { package = "parity-scale-codec", version = "2.0.0", default-features = static_assertions = "1.0.0" primitive-types = { version = "0.9.0", default-features = false } sp-storage = { version = "2.0.0", default-features = false, path = "../storage" } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" [dev-dependencies] sp-runtime-interface-test-wasm = { version = "2.0.0", path = "test-wasm" } diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index 7dd53c6c2e521..1ce71ff72bbb8 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -25,7 +25,7 @@ sp-io = { version = "2.0.0", default-features = false, path = "../io" } log = { version = "0.4.8", optional = true } paste = "1.0" rand = { version = "0.7.2", optional = true } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] } hash256-std-hasher = { version = "0.15.2", default-features = false } either = { version = "1.5", default-features = false } diff --git a/primitives/timestamp/Cargo.toml b/primitives/timestamp/Cargo.toml index dc9f1fae92563..915c589ecc160 100644 --- a/primitives/timestamp/Cargo.toml +++ b/primitives/timestamp/Cargo.toml @@ -18,7 +18,7 @@ sp-std = { version = "2.0.0", default-features = false, path = "../std" } sp-runtime = { version = "2.0.0", default-features = false, path = "../runtime" } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] } sp-inherents = { version = "2.0.0", default-features = false, path = "../inherents" } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" wasm-timer = { version = "0.2", optional = true } [features] diff --git a/primitives/wasm-interface/Cargo.toml b/primitives/wasm-interface/Cargo.toml index 21d2fc4f214a6..a788d6ac92ae8 100644 --- a/primitives/wasm-interface/Cargo.toml +++ b/primitives/wasm-interface/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] wasmi = { version = "0.6.2", optional = true } -impl-trait-for-tuples = "0.2.0" +impl-trait-for-tuples = "0.2.1" sp-std = { version = "2.0.0", path = "../std", default-features = false } codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }