Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a couple uses of the *_List type aliases. #278

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion capnpc-go/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"strings"

"capnproto.org/go/capnp/v3"
"capnproto.org/go/capnp/v3/internal/schema"
)

Expand Down Expand Up @@ -156,7 +157,7 @@ type annotations struct {
Name string
}

func parseAnnotations(list schema.Annotation_List) *annotations {
func parseAnnotations(list capnp.StructList[schema.Annotation]) *annotations {
ann := new(annotations)
for i, n := 0, list.Len(); i < n; i++ {
a := list.At(i)
Expand Down
2 changes: 1 addition & 1 deletion integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ func TestReadNestedListOfStructWithList(t *testing.T) {
t.Errorf("RWTestCapn.nestMatrix[%d]: %v", i, err)
return
}
rowList := air.Nester1Capn_List{List: row.List()}
rowList := capnp.StructList[air.Nester1Capn]{List: row.List()}
if j >= rowList.Len() {
t.Errorf("len(RWTestCapn.nestMatrix[%d]) = %d; tried to index %d", i, rowList.Len(), j)
return
Expand Down