Skip to content

Refactor Fix and Edit API #4182

@MichaReiser

Description

@MichaReiser

This issue is part of #4181. The goal is to prepare the Fix and Edit API to ease adding the Applicability to Fix in a follow-up PR.

I propose the following changes to the API. Please feel free to deviate from or extend the proposal if I overlooked something.

  • Diagnostic:
    • Change fix to Option<Fix>
    • Change set_fix, with_fix and try_set_fix to accept a Fix
  • Fix:
    • Rename new to unspecified
    • Create the new unspecified_edits(edit: Edit, rest: impl IntoIterator<Item = Edit>) -> Self factory function
    • Change unspecified to unspecified(edit: Edit) -> Self
    • Remove is_empty(),
    • Remove the FromIterator, From<Edit> and Default implementations
    • Maybe: Add a push_edit(&mut self, edit; Edit) method

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalAn internal refactor or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions