mirror of https://github.com/v2ray/v2ray-core
Some code optimization
* Removed unnecessary `strings.ToLower()`. * Removed redundant `u` variable.pull/2416/head
parent
8d75477412
commit
0fdad6f0fd
|
@ -146,10 +146,9 @@ func (v *TimedUserValidator) Remove(email string) bool {
|
|||
v.Lock()
|
||||
defer v.Unlock()
|
||||
|
||||
email = strings.ToLower(email)
|
||||
idx := -1
|
||||
for i, u := range v.users {
|
||||
if strings.EqualFold(u.user.Email, email) {
|
||||
for i := range v.users {
|
||||
if strings.EqualFold(v.users[i].user.Email, email) {
|
||||
idx = i
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue