encoding/json: return comparison directly

Change-Id: I4698d0fa78108d83ee91732e8d3878dbff7f9c90
Reviewed-on: https://go-review.googlesource.com/c/go/+/436711
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
This commit is contained in:
cuiweixie 2022-09-29 21:34:02 +08:00 committed by Gopher Robot
parent 4444f850b7
commit 1e65fa58c1

View file

@ -97,10 +97,7 @@ func equalFoldRight(s, t []byte) bool {
t = t[size:]
}
if len(t) > 0 {
return false
}
return true
return len(t) == 0
}
// asciiEqualFold is a specialization of bytes.EqualFold for use when