Skip to content

Commit 41b744e

Browse files
Replace bytes.Compare with bytes.Equal (#236)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
1 parent d43e3ea commit 41b744e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

changeset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (c Changeset) valueChanged(typ reflect.Type, old interface{}, new interface
2828
}
2929

3030
if typ.Kind() == reflect.Slice && typ.Elem().Kind() == reflect.Uint8 {
31-
return bytes.Compare(reflect.ValueOf(old).Bytes(), reflect.ValueOf(new).Bytes()) != 0
31+
return !bytes.Equal(reflect.ValueOf(old).Bytes(), reflect.ValueOf(new).Bytes())
3232
}
3333

3434
return !(typ.Comparable() && old == new)

0 commit comments

Comments
 (0)