near / borsh-rs

Rust implementation of Binary Object Representation Serializer for Hashing
https://borsh.io/
Apache License 2.0
299 stars 65 forks source link

Don’t declare schema for empty enum variants #227

Closed mina86 closed 2 months ago

mina86 commented 11 months ago

No information of the source type is lost by defining empty enum variants as unit type rather than creating a custom declaration for them. At the same time, not doing that simplifies the schemas and reduces chances for name collisions in derived schemas.