File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ pub mut:
39
39
mod2 alias map [string ]string // for `import time as t`, will contain: 'time'=>'t'
40
40
mod2 syms map [string ]string // import time { now } 'time.now'=>'now'
41
41
use_short_fn_args bool
42
- single_line_fields bool // should struct fields be on a single line
43
- it_name string // the name to replace `it` with
42
+ single_line_fields bool // should struct fields be on a single line
44
43
in_lambda_depth int
45
44
inside_const bool
46
45
inside_unsafe bool
@@ -2258,9 +2257,7 @@ pub fn (mut f Fmt) ident(node ast.Ident) {
2258
2257
}
2259
2258
}
2260
2259
f.write_language_prefix (node.language)
2261
- if node.name == 'it' && f.it_name != '' && f.in_lambda_depth == 0 { // allow `it` in lambdas
2262
- f.write (f.it_name)
2263
- } else if node.kind == .blank_ident {
2260
+ if node.kind == .blank_ident {
2264
2261
f.write ('_' )
2265
2262
} else {
2266
2263
mut is_local := false
@@ -2773,9 +2770,6 @@ fn (mut f Fmt) match_branch(branch ast.MatchBranch, single_line bool) {
2773
2770
pub fn (mut f Fmt) match_expr (node ast.MatchExpr) {
2774
2771
f.write ('match ' )
2775
2772
f.expr (node.cond)
2776
- if node.cond is ast.Ident {
2777
- f.it_name = node.cond.name
2778
- }
2779
2773
f.writeln (' {' )
2780
2774
f.indent++
2781
2775
f.comments (node.comments)
@@ -2806,7 +2800,6 @@ pub fn (mut f Fmt) match_expr(node ast.MatchExpr) {
2806
2800
}
2807
2801
f.indent--
2808
2802
f.write ('}' )
2809
- f.it_name = ''
2810
2803
}
2811
2804
2812
2805
pub fn (mut f Fmt) offset_of (node ast.OffsetOf) {
You can’t perform that action at this time.
0 commit comments