mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 23:18:01 +00:00
Decl_storage macro : force traits. (#1317)
* Missing trait def on two calls. Slight mcla refact on transfo. * Allways provide GenesisConfig even when useless (for runtime module export). * Revert "Allways provide GenesisConfig even when useless (for runtime module" This reverts commit 84a29bc592023d1ee107519c58693ec19dbde2d2. * Fix Vec usage (from rstd).
This commit is contained in:
@@ -946,3 +946,29 @@ mod test2 {
|
||||
type BlockNumber = u32;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(dead_code)]
|
||||
mod test3 {
|
||||
pub trait Trait {
|
||||
type Origin;
|
||||
type BlockNumber;
|
||||
}
|
||||
decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin {}
|
||||
}
|
||||
decl_storage! {
|
||||
trait Store for Module<T: Trait> as Test {
|
||||
Foo get(foo) config(initial_foo): u32;
|
||||
}
|
||||
}
|
||||
|
||||
type PairOf<T> = (T, T);
|
||||
|
||||
struct TraitImpl {}
|
||||
|
||||
impl Trait for TraitImpl {
|
||||
type Origin = u32;
|
||||
type BlockNumber = u32;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user