DimaKudosh / difflib

Port of Python's difflib library to Rust
MIT License
47 stars 8 forks source link

Make SequenceMatcher generic over all slice types #5

Closed nmlgc closed 6 years ago

nmlgc commented 6 years ago

As well as other smaller changes that make the code easier to work with.

The only API change that can't be helped are the line_junk and char_junk function pointers in the Differ struct, which now take &&str and &char parameters, respectively. This is probably for the better, since char_junk now operates on Unicode scalar values rather than the single UTF-8 bytes disguised as &str that were previously retrieved via the unsafe slice_unchecked() function.