diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-26 01:08:22 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-30 22:15:05 -0700 |
commit | f4f062d7d4ed730411e04ecd36ee36387e50739c (patch) | |
tree | e7db2234e4848ac14d366b2a975ac16d5ef61aa5 /lib/containers | |
parent | 34ca09cddd36c91351ad49b428f9911c6f6ba0ff (diff) |
Upgrade to lowmemjson v0.2.0
Diffstat (limited to 'lib/containers')
-rw-r--r-- | lib/containers/set.go | 4 |
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{}{} |