-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Multiple improvements to the decl_module!
macro
#953
Conversation
doesn't build, needs resolving... |
Yeah as written in the description, this requires rust 1.30.0 that should be released today. |
6b1e2c3
to
65b99b0
Compare
I'm not sure if this is related I think this may be causing breaking changes to custom modules (Gavin's demo?) - I'm getting compile errors |
@chrisdcosta do you have more context for me? Did you tried to redo gav's demo? If yes, you now need to place your implementation directly into the So before you had something like:
Now you have to write it like:
|
Yes I'd seen the changes in the SRML modules. I was building using the paired-down demo version of substrate generated by |
Okay |
OK I've tied this error down - it's not a problem with the build - it's my use of a type definition for In the live demo the function signature for This causes the error - and presumably is because the changes mean that if |
Should add that it now compiles correctly like this |
…aritytech#948) * Use `add_benchmark` macro * Return error if `batches` is empty * Update Cargo.lock * Companion for paritytech#5463 (paritytech#953) * Fix test with genesis block 0 * Update Cargo.lock
where origin = Origin where system = System
and replaces with more rusty syntax:where origin = Origin, system = System
.deposit_event
by either writingfn deposit_event() = default
which creates the default implementation or by usingfn deposit_event(my_event: MyEvent) { //myimpl }
which supports any custom implementation. This fixes: Automatically impl deposit_event #920decl_module!
macro. This reduces boilerplate code, as now extraimpl<T: Trait> Module<T>
block is required.This currently does not compile on stable, we need to wait for Thursday (23.10), where the required feature will be released as stable with rust 1.30.0.