cgen: remove extra `\n` in map.get (#5630)
parent
0b49e4db1c
commit
61213263cd
|
@ -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(')
|
||||
|
|
Loading…
Reference in New Issue