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:
Guillaume ThiolliereandKian Paimani authored and GitHub committed 2021-02-09 15:28:34 +00:00
1 parent 1ee71e54e5
commit 9fbbecc195
21 files changed
+137 -28

No files matched your search

+12
View File
@@ -41,3 +41,15 @@ frame_support::decl_module! {
/// Some test module
pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {}
}
/// A PalletInfo implementation which just panics.
pub struct PanicPalletInfo;
impl frame_support::traits::PalletInfo for PanicPalletInfo {
fn index<P: 'static>() -> Option<usize> {
unimplemented!("PanicPalletInfo mustn't be triggered by tests");
}
fn name<P: 'static>() -> Option<&'static str> {
unimplemented!("PanicPalletInfo mustn't be triggered by tests");
}
}