cgen: remove extra `\n` in map.get (#5630)

pull/5644/head
yuyi 2020-07-04 00:10:29 +08:00 committed by GitHub
parent 0b49e4db1c
commit 61213263cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2356,7 +2356,7 @@ fn (mut g Gen) index_expr(node ast.IndexExpr) {
g.expr(node.left)
g.write(', ')
g.expr(node.index)
g.write(', &($elem_type_str[]){ $zero }))\n')
g.write(', &($elem_type_str[]){ $zero }))')
} else {
zero := g.type_default(info.value_type)
g.write('(*($elem_type_str*)map_get(')
@ -2366,7 +2366,7 @@ fn (mut g Gen) index_expr(node ast.IndexExpr) {
g.expr(node.left)
g.write(', ')
g.expr(node.index)
g.write(', &($elem_type_str[]){ $zero }))\n')
g.write(', &($elem_type_str[]){ $zero }))')
}
} else if sym.kind == .string && !node.left_type.is_ptr() {
g.write('string_at(')