[#164] sdk/container: Implement Equal method on ID

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-30 20:24:05 +03:00 committed by Leonard Lyubich
parent 1305bc750e
commit cf70026c7e
3 changed files with 34 additions and 2 deletions

View file

@ -30,8 +30,8 @@ func (id *ID) SetSHA256(v [sha256.Size]byte) {
// Equal returns true if identifiers are identical.
func (id *ID) Equal(id2 *ID) bool {
return bytes.Equal(
(*ID)(id).ToV2().GetValue(),
(*ID)(id2).ToV2().GetValue(),
(*refs.ObjectID)(id).GetValue(),
(*refs.ObjectID)(id2).GetValue(),
)
}