mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 05:07:55 +00:00
Replace last usages of <() as PalletInfo> in substrate (#8080)
* replace last occurences * Update frame/support/src/traits.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/test/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * fix dispatch test * move PanicPalletInfo to tests module Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1ee71e54e5
commit
9fbbecc195
@@ -2409,7 +2409,7 @@ mod tests {
|
||||
use crate::weights::{DispatchInfo, DispatchClass, Pays, RuntimeDbWeight};
|
||||
use crate::traits::{
|
||||
CallMetadata, GetCallMetadata, GetCallName, OnInitialize, OnFinalize, OnRuntimeUpgrade,
|
||||
IntegrityTest, Get,
|
||||
IntegrityTest, Get, PalletInfo,
|
||||
};
|
||||
|
||||
pub trait Config: system::Config + Sized where Self::AccountId: From<u32> { }
|
||||
@@ -2562,13 +2562,32 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
impl PalletInfo for TraitImpl {
|
||||
fn index<P: 'static>() -> Option<usize> {
|
||||
let type_id = sp_std::any::TypeId::of::<P>();
|
||||
if type_id == sp_std::any::TypeId::of::<Test>() {
|
||||
return Some(0)
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
fn name<P: 'static>() -> Option<&'static str> {
|
||||
let type_id = sp_std::any::TypeId::of::<P>();
|
||||
if type_id == sp_std::any::TypeId::of::<Test>() {
|
||||
return Some("Test")
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl system::Config for TraitImpl {
|
||||
type Origin = OuterOrigin;
|
||||
type AccountId = u32;
|
||||
type Call = OuterCall;
|
||||
type BaseCallFilter = ();
|
||||
type BlockNumber = u32;
|
||||
type PalletInfo = ();
|
||||
type PalletInfo = Self;
|
||||
type DbWeight = ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user