1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: fix remaining []array warnings

This commit is contained in:
yuyi
2020-04-26 22:25:54 +08:00
committed by GitHub
parent 9f4d498ff1
commit 2574dce174
21 changed files with 34 additions and 36 deletions

View File

@@ -46,7 +46,7 @@ pub fn read_set_cookies(h map[string][]string) []&Cookie {
if cookie_count == 0 {
return []
}
mut cookies := []&Cookie
mut cookies := []&Cookie{}
for _, line in cookies_s {
mut parts := line.trim_space().split(';')
if parts.len == 1 && parts[0] == '' {
@@ -153,7 +153,7 @@ pub fn read_cookies(h map[string][]string, filter string) []&Cookie {
if lines.len == 0 {
return []
}
mut cookies := []&Cookie
mut cookies := []&Cookie{}
for _, _line in lines {
mut line := _line.trim_space()
mut part := ''

View File

@@ -18,7 +18,7 @@ fn http_fetch_mock(_methods []string, _config FetchConfig) ?[]Response {
url := 'https://httpbin.org/'
methods := if _methods.len == 0 { ['GET', 'POST', 'PATCH', 'PUT', 'DELETE'] } else { _methods }
mut config := _config
mut result := []Response
mut result := []Response{}
// Note: httpbin doesn't support head
for method in methods {
lmethod := method.to_lower()