mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Run formatter even though it makes matchesAtHelp
uglier
Signed-off-by: Jan Van Bruggen <JanCVanB@pm.me>
This commit is contained in:
parent
5d814b3ea5
commit
cd5747a15c
@ -459,8 +459,10 @@ matchesAt = \haystack, haystackIndex, needle ->
|
||||
matchesAtHelp = \state ->
|
||||
{ haystack, haystackIndex, needle, needleIndex, needleLength, endIndex } = state
|
||||
isAtEndOfHaystack = haystackIndex >= endIndex
|
||||
|
||||
if isAtEndOfHaystack then
|
||||
didWalkEntireNeedle = needleIndex == needleLength
|
||||
|
||||
didWalkEntireNeedle
|
||||
else
|
||||
doesThisMatch =
|
||||
@ -473,6 +475,7 @@ matchesAtHelp = \state ->
|
||||
haystackIndex: haystackIndex + 1,
|
||||
needleIndex: needleIndex + 1,
|
||||
}
|
||||
|
||||
doesThisMatch && doesRestMatch
|
||||
|
||||
## Walks over the string's UTF-8 bytes, calling a function which updates a state using each
|
||||
|
Loading…
Reference in New Issue
Block a user