Skip to content

Commit 3bd3029

Browse files
qiulaidongfenggopherbot
authored andcommitted
regexp/syntax: use min func
Change-Id: I679c906057577d4a795c07a2f572b969c3ee14d5 GitHub-Last-Rev: fba371d GitHub-Pull-Request: #63350 Reviewed-on: https://go-review.googlesource.com/c/go/+/532218 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent d98f74b commit 3bd3029

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/regexp/syntax/parse.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,12 @@ func minFoldRune(r rune) rune {
382382
if r < minFold || r > maxFold {
383383
return r
384384
}
385-
min := r
385+
m := r
386386
r0 := r
387387
for r = unicode.SimpleFold(r); r != r0; r = unicode.SimpleFold(r) {
388-
if min > r {
389-
min = r
390-
}
388+
m = min(m, r)
391389
}
392-
return min
390+
return m
393391
}
394392

395393
// op pushes a regexp with the given op onto the stack

0 commit comments

Comments
 (0)