Skip to content

Commit

Permalink
prog: simplify execContext.write
Browse files Browse the repository at this point in the history
  • Loading branch information
dvyukov committed Jun 23, 2020
1 parent e5d10a4 commit 8e0c064
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions prog/encodingexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
package prog

import (
"bytes"
"encoding/binary"
"fmt"
"sort"
)
Expand Down Expand Up @@ -223,9 +221,7 @@ func (w *execContext) write(v uint64) {
w.eof = true
return
}
buf := new(bytes.Buffer)
binary.Write(buf, HostEndian, v)
copy(w.buf, buf.Bytes())
HostEndian.PutUint64(w.buf, v)
w.buf = w.buf[8:]
}

Expand Down

0 comments on commit 8e0c064

Please sign in to comment.