fmt: do not insert a space before struct declaration generics (#9239)
parent
5ddb2d5b18
commit
f69cef397c
|
@ -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('>')
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue