From 859d382c6ea26f670d3a57f086487246f36ec9f2 Mon Sep 17 00:00:00 2001 From: Lukas Neubert Date: Sat, 20 Feb 2021 09:54:55 +0100 Subject: [PATCH] fmt: remove a few obsolete comments (#8837) --- vlib/v/fmt/fmt.v | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index 8bfb31d4e0..67d5f9820e 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -415,7 +415,6 @@ pub fn (mut f Fmt) stmt(node ast.Stmt) { // Imports are handled after the file is formatted, to automatically add necessary modules // Just remember the position of the imports for now f.import_pos = f.out.len - // f.imports(f.file.imports) } ast.InterfaceDecl { f.interface_decl(node) @@ -522,7 +521,6 @@ pub fn (mut f Fmt) type_decl(node ast.TypeDecl) { f.wrap_long_line(3, true) } } - // f.write(sum_type_names.join(' | ')) comments << node.comments } } @@ -1150,14 +1148,14 @@ pub fn (mut f Fmt) cast_expr(node ast.CastExpr) { pub fn (mut f Fmt) assoc(node ast.Assoc) { f.writeln('{') - // f.indent++ - f.writeln('\t...$node.var_name') + f.indent++ + f.writeln('...$node.var_name') for i, field in node.fields { - f.write('\t$field: ') + f.write('$field: ') f.expr(node.exprs[i]) f.writeln('') } - // f.indent-- + f.indent-- f.write('}') } @@ -1228,7 +1226,6 @@ pub fn (mut f Fmt) ident(node ast.Ident) { vals := full_name.split('.') mod_prefix := vals[vals.len - 2] const_name := vals[vals.len - 1] - // f.write(f.short_module(full_name)) if mod_prefix == 'main' { f.write(const_name) return @@ -1242,7 +1239,6 @@ pub fn (mut f Fmt) ident(node ast.Ident) { } } name := f.short_module(node.name) - // f.write('<$it.name => $name>') f.write(name) f.mark_import_as_used(name) } @@ -1784,9 +1780,6 @@ pub fn (mut f Fmt) call_expr(node ast.CallExpr) { mod: node.left.name alias: node.left.name } - // for imp in f.file.imports { - // println(imp.mod) - // } } } f.expr(node.left)