This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
decl_event!
should generate only one struct/type
#4288
Labels
I7-refactor
Code needs refactoring.
Z2-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
Z6-mentor
An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Milestone
Currently
decl_event!
createsenum RawEvent
andtype Event =
when you have a generic event, but for none-generic events it just generatesenum Event
.This needs to be unified, aka just generate
enum Event
.As rust automatic trait derives are somewhat broken, the macro will need to implement
Clone
,PartialEq
,Eq
andRuntimeDebug
on it's own. It is required that trait bound will not be put onto the generic parameter itself and instead it needs to be put onto the associated types, so something like this:has the following
PartialEq
bounds:and not:
parity-scale-codec
does this already automatic and soderive(Encode, Decode)
should work without any problems.The code of the macro can be found here
The text was updated successfully, but these errors were encountered: