http: fix method_and_url_to_response definition
parent
e8b26b1b8d
commit
d865fc26eb
|
@ -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('/')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue