Skip to content
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

fix: use value receivers for MarshalXXX methods #117

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Commits on Jul 3, 2024

  1. fix: use value receivers for MarshalXXX methods

    Use value, rather than pointer, receivers for MarshalCBOR and
    MarshalJSON methods. Since those methods don't mutate the structures,
    pointers are not necessary, and using them prevents the methods from
    being invoked when marshaling an instance of that structure (rather than
    a pointer to one). This is not a huge deal as CoRIM fields typically use
    pointers, however it can lead to surprising results when playing with
    the structures on their own.
    
    Signed-off-by: Sergei Trofimov <[email protected]>
    setrofim committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    31ad3e3 View commit details
    Browse the repository at this point in the history