mirror of https://github.com/v2ray/v2ray-core
remove unless check
parent
18e7d107ba
commit
6870ead73e
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue