hohav / peppi

Rust parser for Slippi SSBM replay files
MIT License
37 stars 9 forks source link

Use #[non_exhaustive] for types we expect to change #12

Closed NickCondron closed 2 years ago

NickCondron commented 2 years ago

Adding new public fields to a public type can break backwards compatibility. If we exect some of the types to change as the slp spec changes, we should use the #[non-exhaustive] declaration.

I understand peppi currently doesn't make any backwards compatibility guarantees, but it's probably still a good idea.

https://rust-unofficial.github.io/patterns/idioms/priv-extend.html

NickCondron commented 2 years ago

Hmmm. Maybe this is not a good idea. Idk if this is the recommended use case for the Directive. Closing for now.