Skip to content

Commit 2badd72

Browse files
authored
sp-runtime: make parity-util-mem dependency optional (paritytech#12657)
* `sp-runtime`: make `parity-util-mem` dependency optional * Use default-features = false for sp-runtime in sp-keyring * Remove parity-util-mem from sp-core * Cargo.lock * Restore default-features for keyring dependency
1 parent 087ec5a commit 2badd72

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

primitives/core/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ sp-std = { version = "4.0.0", default-features = false, path = "../std" }
4040
sp-debug-derive = { version = "4.0.0", default-features = false, path = "../debug-derive" }
4141
sp-storage = { version = "6.0.0", default-features = false, path = "../storage" }
4242
sp-externalities = { version = "0.12.0", optional = true, path = "../externalities" }
43-
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
4443
futures = { version = "0.3.21", optional = true }
4544
dyn-clonable = { version = "0.9.0", optional = true }
4645
thiserror = { version = "1.0.30", optional = true }
@@ -78,7 +77,6 @@ bench = false
7877
[features]
7978
default = ["std"]
8079
std = [
81-
"parity-util-mem/std",
8280
"merlin?/std",
8381
"full_crypto",
8482
"log/std",

primitives/runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ either = { version = "1.5", default-features = false }
1919
hash256-std-hasher = { version = "0.15.2", default-features = false }
2020
impl-trait-for-tuples = "0.2.2"
2121
log = { version = "0.4.17", default-features = false }
22-
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"] }
22+
parity-util-mem = { version = "0.12.0", default-features = false, features = ["primitive-types"], optional = true }
2323
paste = "1.0"
2424
rand = { version = "0.7.2", optional = true }
2525
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }

primitives/runtime/src/transaction_validity.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,8 @@ impl From<UnknownTransaction> for TransactionValidity {
226226
/// Depending on the source we might apply different validation schemes.
227227
/// For instance we can disallow specific kinds of transactions if they were not produced
228228
/// by our local node (for instance off-chain workers).
229-
#[derive(
230-
Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug, parity_util_mem::MallocSizeOf,
231-
)]
229+
#[derive(Copy, Clone, PartialEq, Eq, Encode, Decode, RuntimeDebug)]
230+
#[cfg_attr(feature = "std", derive(parity_util_mem::MallocSizeOf))]
232231
pub enum TransactionSource {
233232
/// Transaction is already included in block.
234233
///

0 commit comments

Comments
 (0)