From 241a9f1ad0a48d71a812ddd7a674ef29359d991d Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 21 Nov 2023 11:21:05 +0300 Subject: [PATCH] [#69] util: Rename stableMarshaler It should be with a single `l`, see `json.Marshaler`. Signed-off-by: Evgenii Stratonikov --- util/proto/marshal.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/proto/marshal.go b/util/proto/marshal.go index c4f3a78..b3e6275 100644 --- a/util/proto/marshal.go +++ b/util/proto/marshal.go @@ -15,7 +15,7 @@ import ( ) type ( - stableMarshaller interface { + stableMarshaler interface { StableMarshal([]byte) []byte StableSize() int } @@ -250,7 +250,7 @@ func VarUIntSize(x uint64) int { } type ptrStableMarshaler[T any] interface { - stableMarshaller + stableMarshaler ~*T } @@ -262,7 +262,7 @@ func NestedStructureMarshal[T any, M ptrStableMarshaler[T]](field int64, buf []b return NestedStructureMarshalUnchecked(field, buf, v) } -func NestedStructureMarshalUnchecked[T stableMarshaller](field int64, buf []byte, v T) int { +func NestedStructureMarshalUnchecked[T stableMarshaler](field int64, buf []byte, v T) int { n := v.StableSize() prefix := protowire.EncodeTag(protowire.Number(field), protowire.BytesType) offset := binary.PutUvarint(buf, prefix) @@ -280,7 +280,7 @@ func NestedStructureSize[T any, M ptrStableMarshaler[T]](field int64, v M) (size return NestedStructureSizeUnchecked(field, v) } -func NestedStructureSizeUnchecked[T stableMarshaller](field int64, v T) int { +func NestedStructureSizeUnchecked[T stableMarshaler](field int64, v T) int { n := v.StableSize() return protowire.SizeGroup(protowire.Number(field), protowire.SizeBytes(n)) } -- 2.45.2