From 1b4863b7b37e05c6a36a473069db8d67bf591661 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Wed, 13 May 2020 16:51:36 -0500 Subject: [PATCH] Don't re-wrap stream --- lib/AsyncGenerator.php | 2 +- lib/Internal/AutoDisposingStream.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/AsyncGenerator.php b/lib/AsyncGenerator.php index e307e95..0f6ca82 100644 --- a/lib/AsyncGenerator.php +++ b/lib/AsyncGenerator.php @@ -60,7 +60,7 @@ final class AsyncGenerator implements Stream */ public function transform(): TransformationStream { - return new TransformationStream($this); + return $this->generator->transform(); } /** diff --git a/lib/Internal/AutoDisposingStream.php b/lib/Internal/AutoDisposingStream.php index 6effab4..6152f4a 100644 --- a/lib/Internal/AutoDisposingStream.php +++ b/lib/Internal/AutoDisposingStream.php @@ -51,6 +51,6 @@ class AutoDisposingStream implements Stream */ public function transform(): TransformationStream { - return new TransformationStream($this); + return $this->stream->transform(); } }