Removed pointless hasPrefix in favor of point-free
This commit is contained in:
parent
4d3f576a67
commit
6852c803c4
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user