Skip to content

Commit 7920047

Browse files
Copilotbootjp
andcommitted
store: use binary.BigEndian.PutUint64 in encodeSortableInt64
Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com>
1 parent 6291d40 commit 7920047

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

store/list_helpers.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ func encodeSortableInt64(dst []byte, seq int64) {
8787
if len(dst) < sortableInt64Bytes {
8888
return
8989
}
90-
buf := bytes.NewBuffer(dst[:0])
91-
_ = binary.Write(buf, binary.BigEndian, seq^math.MinInt64)
90+
binary.BigEndian.PutUint64(dst, uint64(seq^math.MinInt64))
9291
}
9392

9493
// IsListMetaKey Exported helpers for other packages (e.g., Redis adapter).

0 commit comments

Comments
 (0)