Skip to content

Commit

Permalink
return value to prevent heap alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
kmulvey committed Dec 17, 2022
1 parent 9f956e2 commit 77adcbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions concurrenthash.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ type ConcurrentHash struct {
}

// NewConcurrentHash is the constructor and entrypoint
func NewConcurrentHash(ctx context.Context, concurrency int, blockSize int64, hashFunc func() hash.Hash) *ConcurrentHash {
return &ConcurrentHash{
func NewConcurrentHash(ctx context.Context, concurrency int, blockSize int64, hashFunc func() hash.Hash) ConcurrentHash {
return ConcurrentHash{
Concurrency: concurrency,
BlockSize: blockSize,
HashConstructor: hashFunc,
Expand Down

0 comments on commit 77adcbf

Please sign in to comment.