Skip to content

Commit

Permalink
fix: make defaultMaxByteSliceSize equal to 1 MiB (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
torwig authored Jan 16, 2024
1 parent 589f785 commit 20c2c8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/modern-go/reflect2"
)

const maxByteSliceSize = 1024 * 1024
const defaultMaxByteSliceSize = 1_048_576 // 1 MiB

// DefaultConfig is the default API.
var DefaultConfig = Config{}.Freeze()
Expand Down Expand Up @@ -262,7 +262,7 @@ func (c *frozenConfig) getBlockLength() int {
func (c *frozenConfig) getMaxByteSliceSize() int {
size := c.config.MaxByteSliceSize
if size == 0 {
return maxByteSliceSize
return defaultMaxByteSliceSize
}
return size
}

0 comments on commit 20c2c8e

Please sign in to comment.