1
0
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:
Alexander Medvednikov 2020-04-06 17:42:47 +02:00
parent e8b26b1b8d
commit d865fc26eb
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ pub fn (req &Request) do() ?Response {
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()
scheme := url.scheme
p := url.path.trim_left('/')

View File

@ -97,7 +97,7 @@ pub fn (c mut Checker) struct_init(struct_init mut ast.StructInit) table.Type {
// struct_field info.
field_name := if is_short_syntax { info.fields[i].name } else { struct_init.fields[i] }
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
}
inited_fields << field_name