Skip to content

fix: unicode is handled properly in strdist#280

Open
letFunny wants to merge 2 commits intocanonical:mainfrom
letFunny:bug-fix-distance-unicode
Open

fix: unicode is handled properly in strdist#280
letFunny wants to merge 2 commits intocanonical:mainfrom
letFunny:bug-fix-distance-unicode

Conversation

@letFunny
Copy link
Copy Markdown
Collaborator

@letFunny letFunny commented Apr 2, 2026

  • Have you signed the CLA?

While doing more performance work I noticed a couple of bugs in our implementation of distance. I will fix each one of them in a different PR so that the perf work can land. I have added a TODO for the next bug. I don't want to fix both as part of the same PR as it will be much harder to reason about the code, the fix for unicode in itself is pretty easy.

}
_ = stop
if cut != 0 && stop {
if cut != 0 && len(b) > 0 && stop {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is not strictly related to unicode but it made the test fail when the second string was empty so I fixed it as well.

@letFunny letFunny added the Bug An undesired feature ;-) label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug An undesired feature ;-)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant