cgen: minor vfmt

pull/9343/head
Alexander Medvednikov 2021-03-17 03:41:52 +03:00
parent 091a1bab27
commit 149151b1e8
3 changed files with 9 additions and 12 deletions

View File

@ -4645,11 +4645,9 @@ fn (mut g Gen) const_decl_init_later(mod string, name string, val string, typ ta
sym := g.table.get_type_symbol(typ) sym := g.table.get_type_symbol(typ)
if styp.starts_with('Array_') { if styp.starts_with('Array_') {
g.cleanups[mod].writeln('\tarray_free(&$cname);') g.cleanups[mod].writeln('\tarray_free(&$cname);')
} } else if styp == 'string' {
else if styp == 'string' {
g.cleanups[mod].writeln('\tstring_free(&$cname);') g.cleanups[mod].writeln('\tstring_free(&$cname);')
} } else if sym.kind == .map {
else if sym.kind == .map {
g.cleanups[mod].writeln('\tmap_free(&$cname);') g.cleanups[mod].writeln('\tmap_free(&$cname);')
} }
} }

View File

@ -298,7 +298,6 @@ pub fn run_app<T>(mut app T, port int) {
} }
} }
[manualfree] [manualfree]
fn handle_conn<T>(mut conn net.TcpConn, mut app T) { fn handle_conn<T>(mut conn net.TcpConn, mut app T) {
conn.set_read_timeout(30 * time.second) conn.set_read_timeout(30 * time.second)