From 9a468563070bb35122918d198530fd299c39bc22 Mon Sep 17 00:00:00 2001 From: mouuii <49775493+mouuii@users.noreply.github.com> Date: Wed, 12 Apr 2023 11:20:30 +0800 Subject: [PATCH] remove reuse buf todo (#117033) * reuse buf Signed-off-by: mouuii <49775493+mouuii@users.noreply.github.com> * remove the todo Signed-off-by: mouuii <49775493+mouuii@users.noreply.github.com> --------- Signed-off-by: mouuii <49775493+mouuii@users.noreply.github.com> --- staging/src/k8s.io/apimachinery/pkg/runtime/codec.go | 1 - 1 file changed, 1 deletion(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/codec.go b/staging/src/k8s.io/apimachinery/pkg/runtime/codec.go index 7fc513dd0e7..73f85286c23 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/codec.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/codec.go @@ -45,7 +45,6 @@ func NewCodec(e Encoder, d Decoder) Codec { // Encode is a convenience wrapper for encoding to a []byte from an Encoder func Encode(e Encoder, obj Object) ([]byte, error) { - // TODO: reuse buffer buf := &bytes.Buffer{} if err := e.Encode(obj, buf); err != nil { return nil, err