Removed pointless hasPrefix in favor of point-free

This commit is contained in:
Brandon Dyck 2024-09-09 15:19:00 -06:00
parent 4d3f576a67
commit 6852c803c4

View File

@ -26,10 +26,6 @@ func not[T any](pred func(T) bool) func(T) bool {
return func(x T) bool { return !pred(x) } return func(x T) bool { return !pred(x) }
} }
func hasPrefix(prefix []byte) func([]byte) bool {
return func(b []byte) bool { return bytes.HasPrefix(b, prefix) }
}
func TestSlice(t *testing.T) { func TestSlice(t *testing.T) {
assertParseFails := func(t rapid.TB, input []byte, p gigaparsec.Parser[byte, []byte]) (parseErr gigaparsec.ParseError) { assertParseFails := func(t rapid.TB, input []byte, p gigaparsec.Parser[byte, []byte]) (parseErr gigaparsec.ParseError) {
t.Helper() t.Helper()