diff options
| author | cuiweixie <cuiweixie@gmail.com> | 2022-09-29 21:34:02 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-09-30 20:10:56 +0000 |
| commit | 1e65fa58c11b78bd0b026583e9ba7f724a84d628 (patch) | |
| tree | 8059d6c099b4d3cf35f2e64f90db9aaa8a44b59b /src/encoding/json | |
| parent | 4444f850b73324bc830d14d199371cc60d5608c7 (diff) | |
| download | go-1e65fa58c11b78bd0b026583e9ba7f724a84d628.tar.xz | |
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>
Diffstat (limited to 'src/encoding/json')
| -rw-r--r-- | src/encoding/json/fold.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/encoding/json/fold.go b/src/encoding/json/fold.go index ab249b2bbe..0f9b09d712 100644 --- a/src/encoding/json/fold.go +++ b/src/encoding/json/fold.go @@ -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 |
