Skip to content

Commit

Permalink
Fix redundant operations on return values (#430)
Browse files Browse the repository at this point in the history
Signed-off-by: cuishuang <[email protected]>
  • Loading branch information
cuishuang authored Sep 19, 2024
1 parent 2d080cf commit f2e0a8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions storage/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"bytes"
"encoding/csv"
"fmt"
"sort"

"github.com/tomwright/dasel/v2"
"github.com/tomwright/dasel/v2/dencoding"
"github.com/tomwright/dasel/v2/util"
"sort"
)

func init() {
Expand Down Expand Up @@ -222,7 +223,7 @@ func (p *CSVParser) ToBytes(value dasel.Value, options ...ReadWriteOption) ([]by
}
}

return append(buffer.Bytes()), nil
return buffer.Bytes(), nil
}

func (p *CSVParser) toBytesHandleDoc(writer *csv.Writer, doc *CSVDocument) error {
Expand Down

0 comments on commit f2e0a8b

Please sign in to comment.