fmt: do not insert a space before struct declaration generics (#9239)

pull/9249/head
Lukas Neubert 2021-03-11 13:54:40 +01:00 committed by GitHub
parent 5ddb2d5b18
commit f69cef397c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -104,7 +104,7 @@ pub fn (mut f Fmt) struct_decl(node ast.StructDecl) {
name := node.name.after('.') name := node.name.after('.')
f.write(name) f.write(name)
if node.gen_types.len > 0 { if node.gen_types.len > 0 {
f.write(' <') f.write('<')
gtypes := node.gen_types.map(f.table.type_to_str(it)).join(', ') gtypes := node.gen_types.map(f.table.type_to_str(it)).join(', ')
f.write(gtypes) f.write(gtypes)
f.write('>') f.write('>')

View File

@ -1,4 +1,4 @@
struct Foo <T> { struct Foo<T> {
pub: pub:
data T data T
} }
@ -9,7 +9,7 @@ fn (f Foo<int>) value() string {
type DB = string type DB = string
struct Repo <T, U> { struct Repo<T, U> {
db DB db DB
pub mut: pub mut:
model T model T