🐛 Bug
When creating a Map, it is necessary to have the keys that are ordered.
However, the generated code does not have the ordering trait.
To reproduce
The following example gives code that does not compile.
Epoch:
NEWTYPESTRUCT: U32
ChainInfo:
STRUCT:
- onemap:
MAP:
KEY:
TYPENAME: Epoch
VALUE:
TYPENAME: Epoch
The generated rust code will not compile due to the lack of Ord and Eq trait assignments. I have not tested but the code should also fail for C++ since C++ requires the operator< to be implemented. Other languages likely have similar issues.
Expected Behavior
There are several ways to address this issue:
- One is to implement the ordering functions whenever they are needed.
- One is to liberally implement the types.
- Identify when a type implements a map over a type containing some floating number and indicate it as invalid.
Additional context
Add any other context about the problem here.
🐛 Bug
When creating a
Map, it is necessary to have the keys that are ordered.However, the generated code does not have the ordering trait.
To reproduce
The following example gives code that does not compile.
The generated rust code will not compile due to the lack of
OrdandEqtrait assignments. I have not tested but the code should also fail for C++ since C++ requires theoperator<to be implemented. Other languages likely have similar issues.Expected Behavior
There are several ways to address this issue:
Additional context
Add any other context about the problem here.