go-ethereum/rlp
Felix Lange 341907cdb8
rlp: return Iterator as non-pointer (#33818)
Most uses of the iterator are like this:

    it, _ := rlp.NewListIterator(data)
    for it.Next() {
        do(it.Value())
    }

This doesn't require the iterator to be a pointer and it's better to
have it stack-allocated. AFAIK the compiler cannot prove it is OK to
stack-allocate when it is returned as a pointer because the methods of
`Iterator` use pointer receiver and also mutate the object.

The iterator type was not exported until very recently, so I think it is
still OK to change this API.
2026-02-11 14:50:24 +01:00
..
internal/rlpstruct all: fix docstrings 2022-10-04 09:18:02 +02:00
rlpgen rlp/rlpgen: implement package renaming support (#31148) 2025-08-01 18:30:48 +02:00
decode.go rlp: remove workaround for Value.Bytes (#32433) 2025-08-15 14:08:27 +02:00
decode_tail_test.go all: update license information 2016-04-15 09:48:05 +02:00
decode_test.go rlp: fix typo in decode test message (#32554) 2025-09-09 09:56:53 +08:00
doc.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
encbuffer.go rlp: refactor to use maths.ReadBits (#32432) 2025-08-21 09:37:08 +08:00
encbuffer_example_test.go rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
encode.go rlp: add RawList for working with un-decoded lists (#33755) 2026-02-04 20:16:24 +01:00
encode_test.go rlp: remove duplicate optionalAndTailField test case (#32614) 2025-09-15 16:16:06 +02:00
encoder_example_test.go rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
iterator.go rlp: return Iterator as non-pointer (#33818) 2026-02-11 14:50:24 +01:00
iterator_test.go rlp: add RawList for working with un-decoded lists (#33755) 2026-02-04 20:16:24 +01:00
raw.go rlp: return Iterator as non-pointer (#33818) 2026-02-11 14:50:24 +01:00
raw_test.go rlp: add RawList for working with un-decoded lists (#33755) 2026-02-04 20:16:24 +01:00
typecache.go rlp: using maps.Clone (#29434) 2024-04-02 10:47:15 +02:00