Skip to content

Commit

Permalink
fix: placate the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ARR4N committed Mar 1, 2024
1 parent 6ff76f1 commit c0bdba0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ func (s *spliceConcat) shrink() error {
func (s *spliceConcat) bytes() ([]byte, error) {
code := new(bytes.Buffer)
for _, sp := range s.all {
sp.buf.WriteTo(code)
if _, err := sp.buf.WriteTo(code); err != nil {
// This should be impossible, but ignoring the error angers the
// linter.
return nil, fmt.Errorf("%T.bytes(): %T.buf.WriteTo(%T): %v", s, sp, code, err)
}

switch sp.op.(type) {
case JUMPDEST:
Expand Down

0 comments on commit c0bdba0

Please sign in to comment.