mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 13:48:00 +00:00
Remove serde requirement from FRAME macros (#8628)
* Remove `serde` requirement from FRAME macros Currently there is some implicit requirement on `serde` being present in the `Cargo.toml` of a pallet when `GenesisConfig` is used. This pr removes this requirement by using the serde attribute `serde(crate = "..")`. * build a unique reexport of serde in impl_opaque_keys, by abusing paste doc concatenation * Optimize Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -63,8 +63,6 @@ mod benchmarking;
|
||||
|
||||
pub mod weights;
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Serialize, Deserialize};
|
||||
use sp_std::prelude::*;
|
||||
use frame_support::{decl_module, decl_storage, decl_event, ensure, print, decl_error, PalletId};
|
||||
use frame_support::traits::{
|
||||
@@ -158,7 +156,7 @@ pub trait SpendFunds<T: Config<I>, I=DefaultInstance> {
|
||||
pub type ProposalIndex = u32;
|
||||
|
||||
/// A spending proposal.
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug)]
|
||||
pub struct Proposal<AccountId, Balance> {
|
||||
/// The account proposing it.
|
||||
|
||||
Reference in New Issue
Block a user