diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index 39252e6c8b..0e899a10d1 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -259,12 +259,6 @@ pub fn (mut f Fmt) imports(imports []ast.Import) { } f.did_imports = true mut num_imports := 0 - /* - if imports.len == 1 { - imp_stmt_str := f.imp_stmt_str(imports[0]) - f.out_imports.writeln('import ${imp_stmt_str}\n') - } else if imports.len > 1 { - */ mut already_imported := map[string]bool{} for imp in imports { if imp.mod !in f.used_imports { @@ -710,7 +704,6 @@ pub fn (mut f Fmt) struct_decl(node ast.StructDecl) { if field.comments.len > 0 { next_first_line = util.imin(next_first_line, field.comments[0].pos.line_nr) } - println('$field.name $next_first_line $before_last_line') if next_first_line - before_last_line > 1 { f.writeln('') } @@ -1772,24 +1765,6 @@ pub fn (mut f Fmt) call_expr(node ast.CallExpr) { f.comments(arg.comments, {}) } if node.is_method { - /* - // x.foo!() experiment - mut is_mut := false - if node.left is ast.Ident { - scope := f.file.scope.innermost(node.pos.pos) - x := node.left as ast.Ident - var := scope.find_var(x.name) or { - panic(err) - } - println(var.typ) - if var.typ != 0 { - sym := f.table.get_type_symbol(var.typ) - if method := f.table.type_find_method(sym, node.name) { - is_mut = method.args[0].is_mut - } - } - } - */ if node.name in ['map', 'filter'] { f.inside_lambda = true defer {