fuse-swift icon indicating copy to clipboard operation
fuse-swift copied to clipboard

Swift 4 & bug fixes

Open Jake000 opened this issue 8 years ago • 0 comments

I have updated the project to compile with no warnings with Xcode 9.2 using Swift 4. The biggest change from this was removing the 'characters' view from a string which was deprecated.

I have also fixed the following two issues I found from my usage:

  1. When searching through a long input (>100 characters) the library would trap from an integer overflow occurring in Fuse.swift, line 179. I added a test confirming this behaviour, and fixed it using the overflow safe operator.

  2. maxPatternLength was declared as a property but never actually used, making the search very slow for long inputs. I have used it when creating the pattern tuple in Fuse.swift, line 77.

Jake000 avatar Feb 28 '18 03:02 Jake000