mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
http: fix method_and_url_to_response definition
This commit is contained in:
parent
e8b26b1b8d
commit
d865fc26eb
@ -227,7 +227,7 @@ pub fn (req &Request) do() ?Response {
|
|||||||
return resp
|
return resp
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (req &Request) method_and_url_to_response(method string, url net_dot_urllib.URL) ?Response {
|
fn (req &Request) method_and_url_to_response(method string, url urllib.URL) ?Response {
|
||||||
host_name := url.hostname()
|
host_name := url.hostname()
|
||||||
scheme := url.scheme
|
scheme := url.scheme
|
||||||
p := url.path.trim_left('/')
|
p := url.path.trim_left('/')
|
||||||
|
@ -97,7 +97,7 @@ pub fn (c mut Checker) struct_init(struct_init mut ast.StructInit) table.Type {
|
|||||||
// struct_field info.
|
// struct_field info.
|
||||||
field_name := if is_short_syntax { info.fields[i].name } else { struct_init.fields[i] }
|
field_name := if is_short_syntax { info.fields[i].name } else { struct_init.fields[i] }
|
||||||
if field_name in inited_fields {
|
if field_name in inited_fields {
|
||||||
c.error('struct init: duplicate field `$field_name` for struct `$typ_sym.name`', struct_init.pos)
|
c.error('duplicate field name in struct literal: `$field_name`', struct_init.pos)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
inited_fields << field_name
|
inited_fields << field_name
|
||||||
|
Loading…
Reference in New Issue
Block a user