multi: replace ioutil.Discard

This commit is contained in:
erik authored and ErikEk committed 2024-04-25 11:23:54 +02:00
1 parent 789c6bac8c
commit c7f81d3142
3 files changed
+4 -7

No files matched your search

+1 -2
View File
@@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"io"
"io/ioutil"
"math"
)
@@ -262,7 +261,7 @@ func (s *Stream) decode(r io.Reader, parsedTypes TypeMap, p2p bool) (TypeMap,
// If the caller provided an initialized TypeMap, record
// the encoded bytes.
var b *bytes.Buffer
writer := ioutil.Discard
writer := io.Discard
if parsedTypes != nil {
b = bytes.NewBuffer(make([]byte, 0, length))
writer = b