difftreelog
fix(rmrk) use derivative for enum defaults
in: master
3 files changed
Cargo.lockdiffbeforeafterboth6329name = "pallet-rmrk-core"6329name = "pallet-rmrk-core"6330version = "0.1.0"6330version = "0.1.0"6331dependencies = [6331dependencies = [6332 "derivative",6332 "frame-benchmarking",6333 "frame-benchmarking",6333 "frame-support",6334 "frame-support",6334 "frame-system",6335 "frame-system",pallets/proxy-rmrk-core/Cargo.tomldiffbeforeafterboth--- a/pallets/proxy-rmrk-core/Cargo.toml
+++ b/pallets/proxy-rmrk-core/Cargo.toml
@@ -23,6 +23,7 @@
pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.22" }
frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.22" }
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
+derivative = { version = "2.2.0", features = ["use_core"] }
[features]
default = ["std"]
pallets/proxy-rmrk-core/src/misc.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/misc.rs
+++ b/pallets/proxy-rmrk-core/src/misc.rs
@@ -1,5 +1,6 @@
use super::*;
use codec::{Encode, Decode};
+use derivative::Derivative;
#[macro_export]
macro_rules! map_common_err_to_proxy {
@@ -49,9 +50,10 @@
}
// todo remove default?
-#[derive(Encode, Decode, PartialEq, Eq, Default)]
+#[derive(Encode, Decode, PartialEq, Eq, Derivative)]
+#[derivative(Default(bound=""))]
pub enum NftType {
- #[default]
+ #[derivative(Default)]
Regular,
Resource,
FixedPart,
@@ -60,9 +62,10 @@
}
// todo remove default?
-#[derive(Encode, Decode, PartialEq, Eq, Default)]
+#[derive(Encode, Decode, PartialEq, Eq, Derivative)]
+#[derivative(Default(bound=""))]
pub enum ResourceType {
- #[default]
+ #[derivative(Default)]
Basic,
Composable,
Slot,