Skip to content

Commit

Permalink
Merge pull request #231 from capnproto/enhancement/codegen-lintfix
Browse files Browse the repository at this point in the history
Lintfix.  Explicitly assign value to `List` field in `StructList`.
  • Loading branch information
zenhack authored Apr 28, 2022
2 parents bd319b7 + e47d8f4 commit 5e5cef8
Show file tree
Hide file tree
Showing 11 changed files with 129 additions and 129 deletions.
2 changes: 1 addition & 1 deletion capnpc-go/templates/structList
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ type {{.Node.Name}}_List = {{.G.Capnp}}.StructList[{{.Node.Name}}]
// New{{.Node.Name}} creates a new list of {{.Node.Name}}.
func New{{.Node.Name}}_List(s *{{.G.Capnp}}.Segment, sz int32) ({{.Node.Name}}_List, error) {
l, err := {{.G.Capnp}}.NewCompositeList(s, {{.G.ObjectSize .Node}}, sz)
return {{.G.Capnp}}.StructList[{{.Node.Name}}]{l}, err
return {{.G.Capnp}}.StructList[{{.Node.Name}}]{List: l}, err
}
100 changes: 50 additions & 50 deletions internal/aircraftlib/aircraft.capnp.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/demo/books/books.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 19 additions & 19 deletions internal/schema/schema.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions rpc/internal/testcapnp/test.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions std/capnp/compat/json/json.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions std/capnp/persistent/persistent.capnp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5e5cef8

Please sign in to comment.