cmdline: minor optimizaztion

pull/4586/head
yuyi 2020-04-25 23:49:51 +08:00 committed by GitHub
parent fb54a2635c
commit ec9566988a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -39,11 +39,9 @@ pub fn option(args []string, param string, def string) string {
// what: ['test']
// ret: ['-stat']
pub fn options_before(args []string, what []string) []string {
mut found := false
mut args_before := []string
for a in args {
if a in what {
found = true
break
}
args_before << a