Skip to content

Refactor ForkVersionedResponse and ForkVersionDeserialize #7286

@michaelsproul

Description

@michaelsproul

To make ForkVersionDeserialize even more type safe, we could remove the requirement that types implementing the trait also implement DeserializeOwned. If we have a type that needs fork info to deserialize correctly, it is probably a footgun for this type to also implement Deserialize, because that will bypass the fork-aware deserialization.

To make this viable we would need to:

  • Remove the bound from ForkVersionDeserialize
  • Make the version field mandatory in ForkVersionedResponse and ensure there is no unintended fallout of making this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions