summaryrefslogtreecommitdiff
path: root/lib/containers
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-26 01:08:22 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-30 22:15:05 -0700
commitf4f062d7d4ed730411e04ecd36ee36387e50739c (patch)
treee7db2234e4848ac14d366b2a975ac16d5ef61aa5 /lib/containers
parent34ca09cddd36c91351ad49b428f9911c6f6ba0ff (diff)
Upgrade to lowmemjson v0.2.0
Diffstat (limited to 'lib/containers')
-rw-r--r--lib/containers/set.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/containers/set.go b/lib/containers/set.go
index 4fc8aad..b2af494 100644
--- a/lib/containers/set.go
+++ b/lib/containers/set.go
@@ -71,7 +71,7 @@ func (o Set[T]) EncodeJSON(w io.Writer) error {
return less(keys[i], keys[j])
})
- return lowmemjson.Encode(w, keys)
+ return lowmemjson.NewEncoder(w).Encode(keys)
}
func (o *Set[T]) DecodeJSON(r io.RuneScanner) error {
@@ -87,7 +87,7 @@ func (o *Set[T]) DecodeJSON(r io.RuneScanner) error {
*o = Set[T]{}
return lowmemjson.DecodeArray(r, func(r io.RuneScanner) error {
var val T
- if err := lowmemjson.Decode(r, &val); err != nil {
+ if err := lowmemjson.NewDecoder(r).Decode(&val); err != nil {
return err
}
(*o)[val] = struct{}{}