File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ pub fn (mut f Fmt) struct_decl(node ast.StructDecl, is_anon bool) {
38
38
field_types << ft
39
39
attrs_len := inline_attrs_len (field.attrs)
40
40
end_pos := field.pos.pos + field.pos.len
41
- mut comments_len := 0 // Length of comments between field name and type
42
41
for comment in field.comments {
43
42
if comment.pos.pos > = end_pos {
44
43
if comment.pos.line_nr == field.pos.line_nr {
@@ -48,11 +47,8 @@ pub fn (mut f Fmt) struct_decl(node ast.StructDecl, is_anon bool) {
48
47
}
49
48
continue
50
49
}
51
- if comment.pos.pos > field.pos.pos {
52
- comments_len + = '/* ${comment.text.trim_left('\x01')} */ ' .len
53
- }
54
50
}
55
- field_aligns.add_info (comments_len + field.name.len, ft.len, field.pos.line_nr)
51
+ field_aligns.add_info (field.name.len, ft.len, field.pos.line_nr)
56
52
if field.has_default_expr {
57
53
default_expr_aligns.add_info (attrs_len, field_types[i].len, field.pos.line_nr,
58
54
use_threshold: true
You can’t perform that action at this time.
0 commit comments