1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-15 08:59:07 -04:00

remove unnecessary equals()

This commit is contained in:
Darien Raymond
2016-11-27 09:19:52 +01:00
parent b1f78a1ffc
commit 77e1427845
5 changed files with 2 additions and 129 deletions

View File

@@ -20,13 +20,13 @@ type AddressSubject struct {
}
func (subject *AddressSubject) NotEquals(another v2net.Address) {
if subject.value.Equals(another) {
if subject.value == another {
subject.Fail("not equals to", another.String())
}
}
func (subject *AddressSubject) Equals(another v2net.Address) {
if !subject.value.Equals(another) {
if subject.value != another {
subject.Fail("equals to", another.String())
}
}