Skip to content

Remove LevEditType::Keep variant #27

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

Merged
merged 1 commit into from
Jan 22, 2023
Merged

Conversation

NickCondron
Copy link
Contributor

The variant was left unused leading to dead match branches and unsound logic. I removed the variant and tried to tidy up editops_from_cost_matrix. I think the code could be improved some more, but I wanted to stop here.

Comment on lines -514 to +513
let mut cur_op = LevEditType::Keep;
let mut cur_op = LevEditType::Replace;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the only change where I wasn't really sure on the semantics. Based on my reading of the code, the initial value of this variable doesn't really matter because it's always set on the first iteration of the following loop.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, initial value doesn't matter.

@encounter
Copy link
Owner

Thanks for the cleanup!

@encounter encounter merged commit 019493f into encounter:main Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants