-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow seperate Serialization of a unit's instructions and debug info #549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with some minor changes.
UnitData
should only be called Data
. We've gone down the route of naming things according to their modules before, but the style I'm trying to enforce now is to avoid it.
That being said, Data
is very generic. Maybe a better name for that and fn data()
could be found. But if not I wouldn't sweat it.
Yeah, I couldn't think of a better name, which is why I went with UnitData. They are inherently tied together. I think it's not so much that it belongs to the module, it's that it's an inherent part of the Unit, like saying "piano key" rather than "key". |
Cheers! |
Thanks for the review! |
Hi,
As discussed on the discord:
This is the cleanest way I could think of to seperate them.
We could remove the
Deref
/DerefMut
if we're happy to changeself.
toself.data
in most uses within this file.I believe it should be compatible with existing serialisations, so shouldn't break anything. However I haven't made any tests for that, I wasn't sure if any already existed.