From d788b27cd4768fbbc82aef636a70b51a5d621181 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 11 Aug 2023 11:00:44 +0800 Subject: [PATCH] internal/fuzz: use the built-in min function Change-Id: I26be9a9faa27c6c03cf8b9dec5908d8617d61312 Reviewed-on: https://go-review.googlesource.com/c/go/+/518276 Run-TryBot: shuang cui Reviewed-by: qiulaidongfeng <2645477756@qq.com> Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov --- src/internal/fuzz/mutator.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/internal/fuzz/mutator.go b/src/internal/fuzz/mutator.go index bb960660ae..4310d57c5c 100644 --- a/src/internal/fuzz/mutator.go +++ b/src/internal/fuzz/mutator.go @@ -44,13 +44,6 @@ func (m *mutator) chooseLen(n int) int { } } -func min(a, b int) int { - if a < b { - return a - } - return b -} - // mutate performs several mutations on the provided values. func (m *mutator) mutate(vals []any, maxBytes int) { // TODO(katiehockman): pull some of these functions into helper methods and