Rename pallet trait Trait to Config (#7599)

* rename Trait to Config

* add test asserting using Trait is still valid.

* fix ui tests
This commit is contained in:
Guillaume Thiolliere
2020-11-30 15:34:54 +01:00
committed by GitHub
parent dd3c84c362
commit 1cbfc9257f
200 changed files with 1767 additions and 1607 deletions
@@ -1,5 +1,5 @@
frame_support::decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {
fn integrity_test() {}
fn integrity_test() {}
@@ -2,7 +2,7 @@ error: `integrity_test` can only be passed once as input.
--> $DIR/reserved_keyword_two_times_integrity_test.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
2 | | pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {
3 | | fn integrity_test() {}
4 | |
5 | | fn integrity_test() {}
@@ -16,7 +16,7 @@ error[E0601]: `main` function not found in crate `$CRATE`
--> $DIR/reserved_keyword_two_times_integrity_test.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
2 | | pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {
3 | | fn integrity_test() {}
4 | |
5 | | fn integrity_test() {}
@@ -1,5 +1,5 @@
frame_support::decl_module! {
pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {
fn on_initialize() -> Weight {
0
}
@@ -2,7 +2,7 @@ error: `on_initialize` can only be passed once as input.
--> $DIR/reserved_keyword_two_times_on_initialize.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
2 | | pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {
3 | | fn on_initialize() -> Weight {
4 | | 0
... |
@@ -16,7 +16,7 @@ error[E0601]: `main` function not found in crate `$CRATE`
--> $DIR/reserved_keyword_two_times_on_initialize.rs:1:1
|
1 | / frame_support::decl_module! {
2 | | pub struct Module<T: Trait> for enum Call where origin: T::Origin, system=self {
2 | | pub struct Module<T: Config> for enum Call where origin: T::Origin, system=self {
3 | | fn on_initialize() -> Weight {
4 | | 0
... |