1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

Remove duplicate len function call.

This commit is contained in:
Jinqiu Yu 2018-02-26 08:57:43 +08:00
parent 3c1a7ad737
commit 2c56f5fd9c

View File

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