diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 452da42fb6..9dd2198b81 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -1047,6 +1047,15 @@ dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hex-literal" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hex-literal-impl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hex-literal-impl" version = "0.1.2" @@ -1055,6 +1064,14 @@ dependencies = [ "proc-macro-hack 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hex-literal-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hmac" version = "0.4.2" @@ -1967,7 +1984,7 @@ version = "1.0.0" dependencies = [ "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-executor 1.0.0", "node-primitives 1.0.0", @@ -2038,7 +2055,6 @@ dependencies = [ name = "node-runtime" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2081,7 +2097,6 @@ dependencies = [ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "exit-future 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3223,7 +3238,6 @@ dependencies = [ name = "srml-assets" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3238,7 +3252,6 @@ dependencies = [ name = "srml-aura" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3260,7 +3273,6 @@ dependencies = [ name = "srml-balances" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3277,7 +3289,6 @@ dependencies = [ name = "srml-consensus" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3294,7 +3305,7 @@ name = "srml-contract" version = "1.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3317,7 +3328,7 @@ dependencies = [ name = "srml-council" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3335,7 +3346,6 @@ dependencies = [ name = "srml-democracy" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3352,7 +3362,6 @@ dependencies = [ name = "srml-example" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3367,7 +3376,7 @@ dependencies = [ name = "srml-executive" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3384,7 +3393,6 @@ dependencies = [ name = "srml-finality-tracker" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3420,7 +3428,6 @@ dependencies = [ name = "srml-indices" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "ref_thread_local 0.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3448,7 +3455,6 @@ dependencies = [ name = "srml-session" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3467,7 +3473,6 @@ dependencies = [ name = "srml-staking" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3488,7 +3493,6 @@ dependencies = [ name = "srml-sudo" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3505,7 +3509,6 @@ name = "srml-support" version = "1.0.0" dependencies = [ "bitmask 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3568,7 +3571,6 @@ name = "srml-system" version = "1.0.0" dependencies = [ "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3583,7 +3585,6 @@ dependencies = [ name = "srml-timestamp" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3599,7 +3600,6 @@ dependencies = [ name = "srml-treasury" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", "sr-io 1.0.0", @@ -3731,7 +3731,7 @@ version = "1.0.0" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 1.0.0", "node-runtime 1.0.0", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4036,7 +4036,7 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4107,7 +4107,6 @@ dependencies = [ name = "substrate-keyring" version = "1.0.0" dependencies = [ - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "sr-primitives 1.0.0", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4245,7 +4244,7 @@ dependencies = [ "hash256-std-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4273,7 +4272,6 @@ dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-derive 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-pubsub 10.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4387,7 +4385,7 @@ version = "1.0.0" dependencies = [ "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4437,7 +4435,6 @@ name = "substrate-test-runtime" version = "1.0.0" dependencies = [ "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4501,7 +4498,7 @@ version = "1.0.0" dependencies = [ "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hash-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "keccak-hasher 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "memory-db 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-codec 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5506,7 +5503,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum hex-literal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc2928beef125e519d69ae1baa8c37ea2e0d3848545217f6db0179c5eb1d639" +"checksum hex-literal 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c3da68162fdd2147e66682e78e729bd77f93b4c99656db058c5782d8c6b6225a" "checksum hex-literal-impl 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "520870c3213943eb8d7803e80180d12a6c7ceb4ae74602544529d1643dc4ddda" +"checksum hex-literal-impl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06095d08c7c05760f11a071b3e1d4c5b723761c01bd8d7201c30a9536668a612" "checksum hmac 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a13f4163aa0c5ca1be584aace0e2212b2e41be5478218d4f657f5f778b2ae2a" "checksum hmac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f127a908633569f208325f86f71255d3363c79721d7f9fe31cd5569908819771" "checksum hmac-drbg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4fe727d41d2eec0a6574d887914347e5ff96a3b87177817e2a9820c5c87fecc2" diff --git a/substrate/core/executor/Cargo.toml b/substrate/core/executor/Cargo.toml index 0278c1704d..d56fb00ad9 100644 --- a/substrate/core/executor/Cargo.toml +++ b/substrate/core/executor/Cargo.toml @@ -25,7 +25,7 @@ tiny-keccak = "1.4.2" [dev-dependencies] assert_matches = "1.1" wabt = "~0.7.4" -hex-literal = "0.1.0" +hex-literal = "0.2.0" [features] default = [] diff --git a/substrate/core/executor/src/wasm_executor.rs b/substrate/core/executor/src/wasm_executor.rs index cc355f6bba..3fe1a1c3cc 100644 --- a/substrate/core/executor/src/wasm_executor.rs +++ b/substrate/core/executor/src/wasm_executor.rs @@ -897,7 +897,7 @@ mod tests { use parity_codec::Encode; use state_machine::TestExternalities; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use primitives::map; #[test] diff --git a/substrate/core/keyring/Cargo.toml b/substrate/core/keyring/Cargo.toml index 74f898b83f..01fa362cad 100644 --- a/substrate/core/keyring/Cargo.toml +++ b/substrate/core/keyring/Cargo.toml @@ -7,7 +7,6 @@ edition = "2018" [dependencies] substrate-primitives = { path = "../primitives" } sr-primitives = { path = "../sr-primitives" } -hex-literal = { version = "0.1.0" } lazy_static = { version = "1.0" } strum = "0.14.0" strum_macros = "0.14.0" diff --git a/substrate/core/primitives/Cargo.toml b/substrate/core/primitives/Cargo.toml index 02133e0655..6d50c8be0e 100644 --- a/substrate/core/primitives/Cargo.toml +++ b/substrate/core/primitives/Cargo.toml @@ -18,7 +18,6 @@ hash-db = { version = "0.12", default-features = false } hash256-std-hasher = { version = "0.12", default-features = false } ring = { version = "0.14", optional = true } untrusted = { version = "0.6", optional = true } -hex-literal = { version = "0.1", optional = true } base58 = { version = "0.1", optional = true } blake2-rfc = { version = "0.2.18", optional = true } schnorrkel = { version = "0.1", optional = true } @@ -33,7 +32,7 @@ regex = {version = "1.1", optional = true } substrate-serializer = { path = "../serializer" } pretty_assertions = "0.6" heapsize = "0.4" -hex-literal = "0.1" +hex-literal = "0.2" rand = "0.6" [features] @@ -57,7 +56,6 @@ std = [ "blake2-rfc", "ring", "untrusted", - "hex-literal", "hex", "base58", "substrate-bip39", diff --git a/substrate/core/primitives/benches/benches.rs b/substrate/core/primitives/benches/benches.rs index b81ef9dc42..a38f5fdae2 100644 --- a/substrate/core/primitives/benches/benches.rs +++ b/substrate/core/primitives/benches/benches.rs @@ -16,10 +16,9 @@ #![feature(test)] extern crate test; -use hex_literal::{hex, hex_impl}; +use hex_literal::hex; use substrate_primitives::hashing::{twox_128, blake2_128}; - const MAX_KEY_SIZE: u32 = 32; fn data_set() -> Vec> { diff --git a/substrate/core/primitives/src/crypto.rs b/substrate/core/primitives/src/crypto.rs index dc886c7b38..dce30fad71 100644 --- a/substrate/core/primitives/src/crypto.rs +++ b/substrate/core/primitives/src/crypto.rs @@ -410,7 +410,7 @@ pub trait Pair: Sized { #[cfg(test)] mod tests { use crate::DeriveJunction; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use super::*; #[derive(Eq, PartialEq, Debug)] diff --git a/substrate/core/primitives/src/ed25519.rs b/substrate/core/primitives/src/ed25519.rs index d095c6445d..8bf3ae4ad0 100644 --- a/substrate/core/primitives/src/ed25519.rs +++ b/substrate/core/primitives/src/ed25519.rs @@ -490,7 +490,7 @@ impl Pair { #[cfg(test)] mod test { use super::*; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use crate::crypto::DEV_PHRASE; #[test] diff --git a/substrate/core/primitives/src/sr25519.rs b/substrate/core/primitives/src/sr25519.rs index e70e35c1ae..8f309ec030 100644 --- a/substrate/core/primitives/src/sr25519.rs +++ b/substrate/core/primitives/src/sr25519.rs @@ -504,7 +504,7 @@ impl Pair { mod test { use super::*; use crate::crypto::{Ss58Codec, DEV_PHRASE, DEV_ADDRESS}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn default_phrase_should_be_used() { diff --git a/substrate/core/rpc/Cargo.toml b/substrate/core/rpc/Cargo.toml index 600cd9ac48..4b00f2bf2d 100644 --- a/substrate/core/rpc/Cargo.toml +++ b/substrate/core/rpc/Cargo.toml @@ -32,4 +32,3 @@ test_client = { package = "substrate-test-client", path = "../test-client" } test_runtime = { package = "substrate-test-runtime", path = "../test-runtime" } consensus = { package = "substrate-consensus-common", path = "../consensus/common" } rustc-hex = "2.0" -hex-literal = "0.1" diff --git a/substrate/core/sr-primitives/src/lib.rs b/substrate/core/sr-primitives/src/lib.rs index e1ec698a4a..08c6b3c9a9 100644 --- a/substrate/core/sr-primitives/src/lib.rs +++ b/substrate/core/sr-primitives/src/lib.rs @@ -33,9 +33,6 @@ use rstd::prelude::*; use substrate_primitives::{crypto, ed25519, sr25519, hash::{H256, H512}}; use codec::{Encode, Decode}; -#[cfg(feature = "std")] -use substrate_primitives::hexdisplay::ascii_format; - #[cfg(feature = "std")] pub mod testing; diff --git a/substrate/core/state-machine/Cargo.toml b/substrate/core/state-machine/Cargo.toml index eed53d49c3..171ae15b28 100644 --- a/substrate/core/state-machine/Cargo.toml +++ b/substrate/core/state-machine/Cargo.toml @@ -6,7 +6,6 @@ description = "Substrate State Machine" edition = "2018" [dependencies] -hex-literal = "0.1.0" log = "0.4" parking_lot = "0.7.1" heapsize = "0.4" @@ -17,3 +16,6 @@ trie = { package = "substrate-trie", path = "../trie" } primitives = { package = "substrate-primitives", path = "../primitives" } panic-handler = { package = "substrate-panic-handler", path = "../panic-handler" } parity-codec = "3.3" + +[dev-dependencies] +hex-literal = "0.2.0" diff --git a/substrate/core/state-machine/src/basic.rs b/substrate/core/state-machine/src/basic.rs index 0c95de61cb..a4863485b7 100644 --- a/substrate/core/state-machine/src/basic.rs +++ b/substrate/core/state-machine/src/basic.rs @@ -166,7 +166,7 @@ impl Externalities for BasicExternalities where H::Out: Ord + Heap mod tests { use super::*; use primitives::{Blake2Hasher, H256}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn commit_should_work() { diff --git a/substrate/core/state-machine/src/ext.rs b/substrate/core/state-machine/src/ext.rs index c88798f37f..a9f2ab9d0e 100644 --- a/substrate/core/state-machine/src/ext.rs +++ b/substrate/core/state-machine/src/ext.rs @@ -360,7 +360,7 @@ where #[cfg(test)] mod tests { - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use parity_codec::Encode; use primitives::{Blake2Hasher}; use primitives::storage::well_known_keys::EXTRINSIC_INDEX; diff --git a/substrate/core/state-machine/src/overlayed_changes.rs b/substrate/core/state-machine/src/overlayed_changes.rs index 56e69323e8..c98882726e 100644 --- a/substrate/core/state-machine/src/overlayed_changes.rs +++ b/substrate/core/state-machine/src/overlayed_changes.rs @@ -309,7 +309,7 @@ impl From>> for OverlayedValue { #[cfg(test)] mod tests { - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; use primitives::{Blake2Hasher, H256}; use primitives::storage::well_known_keys::EXTRINSIC_INDEX; use crate::backend::InMemory; diff --git a/substrate/core/state-machine/src/testing.rs b/substrate/core/state-machine/src/testing.rs index ac096c0c3e..3adf277bf3 100644 --- a/substrate/core/state-machine/src/testing.rs +++ b/substrate/core/state-machine/src/testing.rs @@ -180,7 +180,7 @@ impl Externalities for TestExternalities where H::Out: Ord + He mod tests { use super::*; use primitives::{Blake2Hasher, H256}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn commit_should_work() { diff --git a/substrate/core/test-runtime/Cargo.toml b/substrate/core/test-runtime/Cargo.toml index 2a4540090e..6b3d6f7d9f 100644 --- a/substrate/core/test-runtime/Cargo.toml +++ b/substrate/core/test-runtime/Cargo.toml @@ -6,7 +6,6 @@ edition = "2018" [dependencies] log = { version = "0.4", optional = true } -hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } keyring = { package = "substrate-keyring", path = "../keyring", optional = true } @@ -35,7 +34,6 @@ substrate-test-client = { path = "../test-client" } default = ["std"] std = [ "log", - "hex-literal", "serde", "substrate-client/std", "keyring", diff --git a/substrate/core/trie/Cargo.toml b/substrate/core/trie/Cargo.toml index 1fd1b7b3bd..b47148c28d 100644 --- a/substrate/core/trie/Cargo.toml +++ b/substrate/core/trie/Cargo.toml @@ -25,7 +25,7 @@ trie-bench = { version = "0.12" } trie-standardmap = { version = "0.12" } keccak-hasher = { version = "0.12" } criterion = "0.2" -hex-literal = "0.1.0" +hex-literal = "0.2.0" [features] default = ["std"] diff --git a/substrate/core/trie/src/lib.rs b/substrate/core/trie/src/lib.rs index a9a9860f94..e29402b63c 100644 --- a/substrate/core/trie/src/lib.rs +++ b/substrate/core/trie/src/lib.rs @@ -339,7 +339,7 @@ mod tests { use hash_db::{HashDB, Hasher}; use trie_db::{DBValue, TrieMut, Trie}; use trie_standardmap::{Alphabet, ValueMode, StandardMap}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; fn check_equivalent(input: &Vec<(&[u8], &[u8])>) { { diff --git a/substrate/node-template/Cargo.toml b/substrate/node-template/Cargo.toml index 7ef20cc89f..3e9d8656ea 100644 --- a/substrate/node-template/Cargo.toml +++ b/substrate/node-template/Cargo.toml @@ -17,7 +17,6 @@ log = "0.4" tokio = "0.1" exit-future = "0.1" parking_lot = "0.7.1" -hex-literal = "0.1" parity-codec = "3.3" trie-root = "0.12.2" sr-io = { path = "../core/sr-io" } diff --git a/substrate/node/cli/Cargo.toml b/substrate/node/cli/Cargo.toml index a26d8f3ae8..0ca5dc34f6 100644 --- a/substrate/node/cli/Cargo.toml +++ b/substrate/node/cli/Cargo.toml @@ -19,7 +19,7 @@ primitives = { package = "substrate-primitives", path = "../../core/primitives" inherents = { package = "substrate-inherents", path = "../../core/inherents" } node-runtime = { path = "../runtime" } node-primitives = { path = "../primitives" } -hex-literal = "0.1" +hex-literal = "0.2" substrate-basic-authorship = { path = "../../core/basic-authorship" } substrate-service = { path = "../../core/service" } transaction_pool = { package = "substrate-transaction-pool", path = "../../core/transaction-pool" } diff --git a/substrate/node/cli/src/chain_spec.rs b/substrate/node/cli/src/chain_spec.rs index b09d55c6e9..0c017d2fac 100644 --- a/substrate/node/cli/src/chain_spec.rs +++ b/substrate/node/cli/src/chain_spec.rs @@ -23,7 +23,7 @@ use node_runtime::{ConsensusConfig, CouncilSeatsConfig, CouncilVotingConfig, Dem SudoConfig, ContractConfig, GrandpaConfig, IndicesConfig, Permill, Perbill}; pub use node_runtime::GenesisConfig; use substrate_service; -use hex_literal::{hex, hex_impl}; +use hex_literal::hex; use substrate_telemetry::TelemetryEndpoints; const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; diff --git a/substrate/node/runtime/Cargo.toml b/substrate/node/runtime/Cargo.toml index f8e0e047bc..d6d5207747 100644 --- a/substrate/node/runtime/Cargo.toml +++ b/substrate/node/runtime/Cargo.toml @@ -34,7 +34,6 @@ sudo = { package = "srml-sudo", path = "../../srml/sudo", default-features = fal node-primitives = { path = "../primitives", default-features = false } consensus_aura = { package = "substrate-consensus-aura-primitives", path = "../../core/consensus/aura/primitives", default-features = false } rustc-hex = { version = "2.0", optional = true } -hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true } substrate-keyring = { path = "../../core/keyring", optional = true } consensus_authorities = { package = "substrate-consensus-authorities", path = "../../core/consensus/authorities", default-features = false } @@ -73,7 +72,6 @@ std = [ "client/std", "consensus_aura/std", "rustc-hex", - "hex-literal", "substrate-keyring", "offchain-primitives/std", "consensus_authorities/std", diff --git a/substrate/srml/assets/Cargo.toml b/substrate/srml/assets/Cargo.toml index 066dd42ffd..726c7f3580 100644 --- a/substrate/srml/assets/Cargo.toml +++ b/substrate/srml/assets/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false } # Needed for various traits. In our case, `OnFinalize`. diff --git a/substrate/srml/aura/Cargo.toml b/substrate/srml/aura/Cargo.toml index b22fea8ffd..4ec1c27c71 100644 --- a/substrate/srml/aura/Cargo.toml +++ b/substrate/srml/aura/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" parity-codec = { version = "3.3", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } diff --git a/substrate/srml/balances/Cargo.toml b/substrate/srml/balances/Cargo.toml index 804ee60364..df8c31c865 100644 --- a/substrate/srml/balances/Cargo.toml +++ b/substrate/srml/balances/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/substrate/srml/consensus/Cargo.toml b/substrate/srml/consensus/Cargo.toml index ef3e943c8d..267e394ffb 100644 --- a/substrate/srml/consensus/Cargo.toml +++ b/substrate/srml/consensus/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } substrate-primitives = { path = "../../core/primitives", default-features = false } diff --git a/substrate/srml/contract/Cargo.toml b/substrate/srml/contract/Cargo.toml index 28ca8f9eb9..6d302c208c 100644 --- a/substrate/srml/contract/Cargo.toml +++ b/substrate/srml/contract/Cargo.toml @@ -22,7 +22,7 @@ timestamp = { package = "srml-timestamp", path = "../timestamp", default-feature [dev-dependencies] wabt = "~0.7.4" assert_matches = "1.1" -hex-literal = "0.1.0" +hex-literal = "0.2.0" consensus = { package = "srml-consensus", path = "../consensus" } balances = { package = "srml-balances", path = "../balances" } diff --git a/substrate/srml/contract/src/tests.rs b/substrate/srml/contract/src/tests.rs index d6fa2677df..0e7270769c 100644 --- a/substrate/srml/contract/src/tests.rs +++ b/substrate/srml/contract/src/tests.rs @@ -29,7 +29,7 @@ use srml_support::{storage::child, StorageMap, assert_ok, impl_outer_event, impl use substrate_primitives::Blake2Hasher; use system::{self, Phase, EventRecord}; use {wabt, balances, consensus}; -use hex_literal::*; +use hex_literal::hex; use assert_matches::assert_matches; use crate::{ ContractAddressFor, GenesisConfig, Module, RawEvent, diff --git a/substrate/srml/council/Cargo.toml b/substrate/srml/council/Cargo.toml index 87de0ae0d1..c4d535af53 100644 --- a/substrate/srml/council/Cargo.toml +++ b/substrate/srml/council/Cargo.toml @@ -17,7 +17,7 @@ democracy = { package = "srml-democracy", path = "../democracy", default-feature system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -hex-literal = "0.1.0" +hex-literal = "0.2.0" balances = { package = "srml-balances", path = "../balances" } [features] diff --git a/substrate/srml/council/src/motions.rs b/substrate/srml/council/src/motions.rs index 3bbe463780..393ebce4f8 100644 --- a/substrate/srml/council/src/motions.rs +++ b/substrate/srml/council/src/motions.rs @@ -205,7 +205,7 @@ mod tests { use crate::tests::{Call, Origin, Event as OuterEvent}; use srml_support::{Hashable, assert_ok, assert_noop}; use system::{EventRecord, Phase}; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; #[test] fn motions_basic_environment_works() { diff --git a/substrate/srml/democracy/Cargo.toml b/substrate/srml/democracy/Cargo.toml index e789c733d6..8fbe34bb2e 100644 --- a/substrate/srml/democracy/Cargo.toml +++ b/substrate/srml/democracy/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/substrate/srml/example/Cargo.toml b/substrate/srml/example/Cargo.toml index c62b61f7b3..ae9f2f508e 100644 --- a/substrate/srml/example/Cargo.toml +++ b/substrate/srml/example/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false } srml-support = { path = "../support", default-features = false } diff --git a/substrate/srml/executive/Cargo.toml b/substrate/srml/executive/Cargo.toml index 0526e86ca9..ef2190da54 100644 --- a/substrate/srml/executive/Cargo.toml +++ b/substrate/srml/executive/Cargo.toml @@ -14,7 +14,7 @@ srml-support = { path = "../support", default-features = false } system = { package = "srml-system", path = "../system", default-features = false } [dev-dependencies] -hex-literal = "0.1.0" +hex-literal = "0.2.0" substrate-primitives = { path = "../../core/primitives" } srml-indices = { path = "../indices" } balances = { package = "srml-balances", path = "../balances" } diff --git a/substrate/srml/executive/src/lib.rs b/substrate/srml/executive/src/lib.rs index 271d7156ac..6ca10bed2d 100644 --- a/substrate/srml/executive/src/lib.rs +++ b/substrate/srml/executive/src/lib.rs @@ -365,7 +365,7 @@ mod tests { use primitives::testing::{Digest, DigestItem, Header, Block}; use srml_support::{traits::Currency, impl_outer_origin, impl_outer_event}; use system; - use hex_literal::{hex, hex_impl}; + use hex_literal::hex; impl_outer_origin! { pub enum Origin for Runtime { diff --git a/substrate/srml/finality-tracker/Cargo.toml b/substrate/srml/finality-tracker/Cargo.toml index c85534f1eb..b0b2c53b58 100644 --- a/substrate/srml/finality-tracker/Cargo.toml +++ b/substrate/srml/finality-tracker/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", default-features = false, features = ["derive"] } parity-codec = { version = "3.3", default-features = false } inherents = { package = "substrate-inherents", path = "../../core/inherents", default-features = false } diff --git a/substrate/srml/indices/Cargo.toml b/substrate/srml/indices/Cargo.toml index 8c62cf13b5..ad666e7a54 100644 --- a/substrate/srml/indices/Cargo.toml +++ b/substrate/srml/indices/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/substrate/srml/session/Cargo.toml b/substrate/srml/session/Cargo.toml index 036f5a55ec..7739e9746f 100644 --- a/substrate/srml/session/Cargo.toml +++ b/substrate/srml/session/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/substrate/srml/staking/Cargo.toml b/substrate/srml/staking/Cargo.toml index cd10f783b1..e26814ffde 100644 --- a/substrate/srml/staking/Cargo.toml +++ b/substrate/srml/staking/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.3", default-features = false, features = ["derive"] } diff --git a/substrate/srml/sudo/Cargo.toml b/substrate/srml/sudo/Cargo.toml index 220127ba3b..788d24e1c3 100644 --- a/substrate/srml/sudo/Cargo.toml +++ b/substrate/srml/sudo/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } sr-std = { path = "../../core/sr-std", default-features = false } diff --git a/substrate/srml/support/Cargo.toml b/substrate/srml/support/Cargo.toml index ab16e98ee9..1d44412be7 100644 --- a/substrate/srml/support/Cargo.toml +++ b/substrate/srml/support/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = { version = "0.1.0", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } codec = { package = "parity-codec", version = "3.5.1", default-features = false, features = ["derive"] } srml-metadata = { path = "../metadata", default-features = false } @@ -25,7 +24,6 @@ srml-system = { path = "../system", default-features = false } [features] default = ["std"] std = [ - "hex-literal", "once_cell", "bitmask/std", "serde", diff --git a/substrate/srml/system/Cargo.toml b/substrate/srml/system/Cargo.toml index 0effeae251..0153906c97 100644 --- a/substrate/srml/system/Cargo.toml +++ b/substrate/srml/system/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } safe-mix = { version = "1.0", default-features = false} parity-codec = { version = "3.5", default-features = false, features = ["derive"] } diff --git a/substrate/srml/timestamp/Cargo.toml b/substrate/srml/timestamp/Cargo.toml index c86493890a..b785dd9184 100644 --- a/substrate/srml/timestamp/Cargo.toml +++ b/substrate/srml/timestamp/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } diff --git a/substrate/srml/treasury/Cargo.toml b/substrate/srml/treasury/Cargo.toml index a4f3960edd..e0716f6c59 100644 --- a/substrate/srml/treasury/Cargo.toml +++ b/substrate/srml/treasury/Cargo.toml @@ -5,7 +5,6 @@ authors = ["Parity Technologies "] edition = "2018" [dependencies] -hex-literal = "0.1.0" serde = { version = "1.0", optional = true, features = ["derive"] } parity-codec = { version = "3.3", default-features = false, features = ["derive"] } rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false } diff --git a/substrate/subkey/Cargo.toml b/substrate/subkey/Cargo.toml index 280f18887e..bd44c8754a 100644 --- a/substrate/subkey/Cargo.toml +++ b/substrate/subkey/Cargo.toml @@ -16,7 +16,7 @@ rustc-hex = "2.0" substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39" } schnorrkel = "0.1" hex = "0.3" -hex-literal = "0.1" +hex-literal = "0.2" parity-codec = "3.2" [features] diff --git a/substrate/subkey/src/main.rs b/substrate/subkey/src/main.rs index 2aa8609623..b0ad1b281d 100644 --- a/substrate/subkey/src/main.rs +++ b/substrate/subkey/src/main.rs @@ -18,11 +18,8 @@ #[cfg(feature = "bench")] extern crate test; -extern crate substrate_bip39; -extern crate rustc_hex; -#[macro_use] extern crate hex_literal; - use std::io::{stdin, Read}; +use hex_literal::hex; use clap::load_yaml; use rand::{RngCore, rngs::OsRng}; use substrate_bip39::mini_secret_from_entropy;