revid: using chunk.WriteTo rather than chunk.Bytes to get data to encoders

This commit is contained in:
Saxon 2019-03-13 12:25:57 +10:30
parent b8b26de901
commit 627297ce7e
1 changed files with 2 additions and 5 deletions

View File

@ -462,12 +462,9 @@ loop:
break loop break loop
} }
// Get bytes from the chunk.
bytes := chunk.Bytes()
// Loop over encoders and hand bytes over to each one. // Loop over encoders and hand bytes over to each one.
for _, enc := range r.encoder { for _, e := range r.encoder {
_, err := enc.Write(bytes) _, err := chunk.WriteTo(e)
if err != nil { if err != nil {
r.err <- err r.err <- err
} }