1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
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('.')
f.write(name)
if node.gen_types.len > 0 {
f.write(' <')
f.write('<')
gtypes := node.gen_types.map(f.table.type_to_str(it)).join(', ')
f.write(gtypes)
f.write('>')

View File

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