Skip to content

Commit

Permalink
secure/precis: replace bytes.Compare with bytes.Equal
Browse files Browse the repository at this point in the history
Change-Id: Ifa6ba05253b38e1cb3d5791e62b36a523fb68e52
GitHub-Last-Rev: 2d7de01
GitHub-Pull-Request: #36
Reviewed-on: https://go-review.googlesource.com/c/text/+/438559
Run-TryBot: Dmitri Shuralyov <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
  • Loading branch information
cuishuang authored and gopherbot committed Oct 4, 2022
1 parent 795e854 commit b18d3dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secure/precis/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b18d3dd

Please sign in to comment.