1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

remove unless check

This commit is contained in:
Darien Raymond 2018-11-23 17:04:32 +01:00
parent 18e7d107ba
commit 6870ead73e
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -156,11 +156,11 @@ func (v *TimedUserValidator) Remove(email string) bool {
return false
}
ulen := len(v.users)
if idx < ulen {
v.users[idx] = v.users[ulen-1]
v.users[ulen-1] = nil
v.users = v.users[:ulen-1]
}
v.users[idx] = v.users[ulen-1]
v.users[ulen-1] = nil
v.users = v.users[:ulen-1]
return true
}