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

Refactor Fix and Edit API #4182

Closed
Tracked by #4181
MichaReiser opened this issue May 2, 2023 · 0 comments · Fixed by #4198
Closed
Tracked by #4181

Refactor Fix and Edit API #4182

MichaReiser opened this issue May 2, 2023 · 0 comments · Fixed by #4198
Labels
internal An internal refactor or improvement

Comments

@MichaReiser
Copy link
Member

MichaReiser commented May 2, 2023

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
@MichaReiser MichaReiser added the help wanted Contributions especially welcome label May 2, 2023
@MichaReiser MichaReiser added internal An internal refactor or improvement and removed help wanted Contributions especially welcome labels May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant