Run formatter even though it makes matchesAtHelp uglier

Signed-off-by: Jan Van Bruggen <JanCVanB@pm.me>
This commit is contained in:
Jan Van Bruggen 2022-09-29 22:04:23 -06:00
parent 5d814b3ea5
commit cd5747a15c
No known key found for this signature in database
GPG key ID: FE2A4E38E0FA6134

View file

@ -459,8 +459,10 @@ matchesAt = \haystack, haystackIndex, needle ->
matchesAtHelp = \state -> matchesAtHelp = \state ->
{ haystack, haystackIndex, needle, needleIndex, needleLength, endIndex } = state { haystack, haystackIndex, needle, needleIndex, needleLength, endIndex } = state
isAtEndOfHaystack = haystackIndex >= endIndex isAtEndOfHaystack = haystackIndex >= endIndex
if isAtEndOfHaystack then if isAtEndOfHaystack then
didWalkEntireNeedle = needleIndex == needleLength didWalkEntireNeedle = needleIndex == needleLength
didWalkEntireNeedle didWalkEntireNeedle
else else
doesThisMatch = doesThisMatch =
@ -473,6 +475,7 @@ matchesAtHelp = \state ->
haystackIndex: haystackIndex + 1, haystackIndex: haystackIndex + 1,
needleIndex: needleIndex + 1, needleIndex: needleIndex + 1,
} }
doesThisMatch && doesRestMatch doesThisMatch && doesRestMatch
## Walks over the string's UTF-8 bytes, calling a function which updates a state using each ## Walks over the string's UTF-8 bytes, calling a function which updates a state using each