From e5a36ca8b8e841fbd73bdee6d1d8c48ac7c19d49 Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Mon, 30 Oct 2023 21:09:53 -0400 Subject: [PATCH] nit --- codec/reflectcodec/type_codec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec/reflectcodec/type_codec.go b/codec/reflectcodec/type_codec.go index dbbf92d264f0..8362726c468f 100644 --- a/codec/reflectcodec/type_codec.go +++ b/codec/reflectcodec/type_codec.go @@ -613,7 +613,7 @@ func (c *genericCodec) unmarshal( return p.Err } // Unmarshal each element and append it into the slice. - value.Set(reflect.MakeSlice(value.Type(), 0, initialSliceLen)) + value.Set(reflect.MakeSlice(sliceType, 0, initialSliceLen)) zeroValue := reflect.Zero(innerType) for i := 0; i < numElts; i++ { value.Set(reflect.Append(value, zeroValue))