]> Cypherpunks repositories - gostls13.git/commitdiff
regexp/syntax: use min func
authorqiulaidongfeng <2645477756@qq.com>
Tue, 3 Oct 2023 14:22:16 +0000 (14:22 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 3 Oct 2023 19:49:07 +0000 (19:49 +0000)
Change-Id: I679c906057577d4a795c07a2f572b969c3ee14d5
GitHub-Last-Rev: fba371d2d6bfc7fbf3a93a53bb22039acf65d7cf
GitHub-Pull-Request: golang/go#63350
Reviewed-on: https://go-review.googlesource.com/c/go/+/532218
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/regexp/syntax/parse.go

index 6b360b8700028522581a26ba6f8d30c638419799..6a11b53fb1806d121010d7551cf528a208f57158 100644 (file)
@@ -382,14 +382,12 @@ func minFoldRune(r rune) rune {
        if r < minFold || r > maxFold {
                return r
        }
-       min := r
+       m := r
        r0 := r
        for r = unicode.SimpleFold(r); r != r0; r = unicode.SimpleFold(r) {
-               if min > r {
-                       min = r
-               }
+               m = min(m, r)
        }
-       return min
+       return m
 }
 
 // op pushes a regexp with the given op onto the stack