Skip to content

Commit

Permalink
Merge pull request #116 from josharian/remove-alloc
Browse files Browse the repository at this point in the history
apd: remove some allocs from Decimal.setString
  • Loading branch information
nvanbenschoten authored Jun 16, 2022
2 parents affdb59 + 3844633 commit 9f9f7a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decimal.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (d *Decimal) setString(c *Context, s string) (Condition, error) {
return 0, nil
}

var exps []int64
exps := make([]int64, 0, 2)
if i := strings.IndexByte(s, 'e'); i >= 0 {
exp, err := strconv.ParseInt(s[i+1:], 10, 32)
if err != nil {
Expand Down

0 comments on commit 9f9f7a5

Please sign in to comment.