summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/json/compat.go3
-rw-r--r--compat/json/testcompat_test.go4
2 files changed, 4 insertions, 3 deletions
diff --git a/compat/json/compat.go b/compat/json/compat.go
index c96470d..0b86732 100644
--- a/compat/json/compat.go
+++ b/compat/json/compat.go
@@ -15,6 +15,7 @@ import (
"strconv"
"git.lukeshu.com/go/lowmemjson"
+ "git.lukeshu.com/go/lowmemjson/internal/fastio"
)
//nolint:stylecheck // ST1021 False positive; these aren't comments on individual types.
@@ -172,7 +173,7 @@ func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error {
}
func Valid(data []byte) bool {
- formatter := lowmemjson.NewReEncoder(io.Discard, lowmemjson.ReEncoderConfig{
+ formatter := lowmemjson.NewReEncoder(fastio.Discard, lowmemjson.ReEncoderConfig{
Compact: true,
})
_, err := formatter.Write(data)
diff --git a/compat/json/testcompat_test.go b/compat/json/testcompat_test.go
index 42cbf5c..c186678 100644
--- a/compat/json/testcompat_test.go
+++ b/compat/json/testcompat_test.go
@@ -7,10 +7,10 @@ package json
import (
"bytes"
"encoding/json"
- "io"
_ "unsafe"
"git.lukeshu.com/go/lowmemjson"
+ "git.lukeshu.com/go/lowmemjson/internal/fastio"
"git.lukeshu.com/go/lowmemjson/internal/jsonparse"
"git.lukeshu.com/go/lowmemjson/internal/jsonstring"
"git.lukeshu.com/go/lowmemjson/internal/jsonstruct"
@@ -25,7 +25,7 @@ var (
type scanner = lowmemjson.ReEncoderConfig
func checkValid(in []byte, scan *lowmemjson.ReEncoderConfig) error {
- return reencode(io.Discard, in, *scan)
+ return reencode(fastio.Discard, in, *scan)
}
func isValidNumber(s string) bool {