git.delta.rocks / unique-network / refs/commits / 5ace65046039

difftreelog

feat add rmrk composable key support

Daniel Shiposha2022-05-19parent: #e760275.patch.diff
in: master

1 file changed

modifiedpallets/proxy-rmrk-core/src/property.rsdiffbeforeafterboth
7575
76#[macro_export]76#[macro_export]
77macro_rules! rmrk_property {77macro_rules! rmrk_property {
78 (Config=$cfg:ty, $key:ident: $value:expr) => {{78 (Config=$cfg:ty, $key:ident $(($key_ext:expr))?: $value:expr) => {{
79 let key = rmrk_property!(@$cfg, $key)?;79 let key = rmrk_property!(@$cfg, $key $(($key_ext))?)?;
8080
81 let value = $value.into_property_value()81 let value = $value.into_property_value()
82 .map_err(<$crate::Error<$cfg>>::from)?;82 .map_err(<$crate::Error<$cfg>>::from)?;
87 })87 })
88 }};88 }};
8989
90 (@$cfg:ty, $key:ident) => {90 (@$cfg:ty, $key:ident $(($key_ext:expr))?) => {
91 $crate::RmrkProperty::$key.to_key::<$cfg>()91 $crate::RmrkProperty::$key $(($key_ext))?.to_key::<$cfg>()
92 };92 };
9393
94 (Config=$cfg:ty, $key:ident) => {94 (Config=$cfg:ty, $key:ident $(($key_ext:expr))?) => {
95 PropertyScope::Rmrk.apply(rmrk_property!(@$cfg, $key)?)95 PropertyScope::Rmrk.apply(rmrk_property!(@$cfg, $key $(($key_ext))?)?)
96 .map_err(|_| <$crate::Error<$cfg>>::RmrkPropertyKeyIsTooLong)96 .map_err(|_| <$crate::Error<$cfg>>::RmrkPropertyKeyIsTooLong)
97 };97 };
98}98}