diff options
author | cui fliter <imcusg@gmail.com> | 2022-10-04 14:50:44 +0000 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2022-10-04 22:54:18 +0000 |
commit | b18d3dd8a4b426ebedcf279b593e85ac4985b9d3 (patch) | |
tree | 978c107da1e0c8320aafe47f5cb60c287bd80cec | |
parent | 795e854ff348c9cac4fd0033ce04c417705dd0bb (diff) | |
download | golang-x-text-b18d3dd8a4b426ebedcf279b593e85ac4985b9d3.tar.gz |
secure/precis: replace bytes.Compare with bytes.Equal
Change-Id: Ifa6ba05253b38e1cb3d5791e62b36a523fb68e52
GitHub-Last-Rev: 2d7de01c3d93285224e3c65f55845a316da8f4d0
GitHub-Pull-Request: golang/text#36
Reviewed-on: https://go-review.googlesource.com/c/text/+/438559
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
-rw-r--r-- | secure/precis/profile.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/secure/precis/profile.go b/secure/precis/profile.go index 35bd6f0..bdd991b 100644 --- a/secure/precis/profile.go +++ b/secure/precis/profile.go @@ -316,7 +316,7 @@ func (p *Profile) Compare(a, b string) bool { return false } - return bytes.Compare(akey, bkey) == 0 + return bytes.Equal(akey, bkey) } // Allowed returns a runes.Set containing every rune that is a member of the |