streamdata: optionally reuse buffer

This enables use of stdlib iterator helpers.

Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
2026-03-20 03:17:37 +09:00
parent ebb49770e7
commit 3389848f45
3 changed files with 11 additions and 4 deletions

View File

@@ -303,7 +303,7 @@ func TestChannel(t *testing.T) {
}
var iterErr error
idents := slices.Collect(c.All(&iterErr))
idents := slices.Collect(c.All(&iterErr, false))
if iterErr != nil {
t.Fatalf("All: error = %#v", iterErr)
}