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:
@@ -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 := ''
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user