From 7610cff62a667fbdb3023292b46753e58ef4c035 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 13 Feb 2026 21:07:13 +0100 Subject: [PATCH] rlp: remove RawList.Empty --- rlp/raw.go | 5 ----- rlp/raw_test.go | 3 --- 2 files changed, 8 deletions(-) diff --git a/rlp/raw.go b/rlp/raw.go index 798165621e..811a8e5e5a 100644 --- a/rlp/raw.go +++ b/rlp/raw.go @@ -123,11 +123,6 @@ func (r *RawList[T]) Size() uint64 { return ListSize(uint64(len(r.Content()))) } -// Empty returns true if the list contains no items. -func (r *RawList[T]) Empty() bool { - return len(r.Content()) == 0 -} - // ContentIterator returns an iterator over the content of the list. // Note the offsets returned by iterator.Offset are relative to the // Content bytes of the list. diff --git a/rlp/raw_test.go b/rlp/raw_test.go index 03e298af8d..67e626ebf9 100644 --- a/rlp/raw_test.go +++ b/rlp/raw_test.go @@ -154,9 +154,6 @@ func TestRawListEmpty(t *testing.T) { if !bytes.Equal(b, unhex("C0")) { t.Fatalf("empty RawList has wrong encoding %x", b) } - if !rl.Empty() { - t.Fatal("list should be Empty") - } if rl.Len() != 0 { t.Fatalf("empty list has Len %d", rl.Len()) }