Closed nc7s closed 8 months ago
Take UnifiedDiff as an example:
UnifiedDiff
https://github.com/mitsuhiko/similar/blob/2b31f65445df9093ba007ca5a5ae6a71b899d491/src/udiff.rs#L181-L194
https://github.com/mitsuhiko/similar/blob/2b31f65445df9093ba007ca5a5ae6a71b899d491/src/udiff.rs#L298-L314
One is limited to unicode, the other one works for all bytes. That's why there are minor differences between the two. Could probably be written with less repetition, but this was easier.
Take
UnifiedDiff
as an example:https://github.com/mitsuhiko/similar/blob/2b31f65445df9093ba007ca5a5ae6a71b899d491/src/udiff.rs#L181-L194
https://github.com/mitsuhiko/similar/blob/2b31f65445df9093ba007ca5a5ae6a71b899d491/src/udiff.rs#L298-L314