From 55b025413da78ca9f508a51accd1c0c3060fd888 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 19 Aug 2020 14:33:42 +0200 Subject: [PATCH] fmt: temporary struct attr fix --- vlib/v/fmt/fmt.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index ad6dc0ffcf..ac55930b55 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -631,7 +631,7 @@ pub fn (mut f Fmt) struct_decl(node ast.StructDecl) { f.write('\t$field.name ') f.write(strings.repeat(` `, max - field.name.len)) f.write(field_types[i]) - if field.attrs.len > 0 { + if field.attrs.len > 0 && field.attrs[0].name != 'ref_only' { // TODO a bug with [ref_only] attr being added to fields, fix it f.write(strings.repeat(` `, max_type - field_types[i].len)) f.inline_attrs(field.attrs) }