From ff2fd98509ab9ba8e8a73c130f0d595d86c89830 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 9 Jul 2024 10:35:34 +0200 Subject: [PATCH] Fix build error on go1.23rc1 Signed-off-by: Sascha Grunert --- list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/list.go b/list.go index 0f6af2b9..3099f5f8 100644 --- a/list.go +++ b/list.go @@ -1081,10 +1081,10 @@ func (s StructList[T]) Set(i int, v T) error { // A list of some Cap'n Proto capability type T. type CapList[T ~ClientKind] PointerList -func (c CapList[T]) At(i int) (T, error) { +func (c CapList[T]) At(i int) (res T, err error) { ptr, err := PointerList(c).At(i) if err != nil { - return T{}, err + return res, err } return T(ptr.Interface().Client()), nil }