From 6f3e6fc4a7922ba67c5866e664ae3a564d95a504 Mon Sep 17 00:00:00 2001 From: Leaf Petersen Date: Fri, 2 Mar 2018 11:22:57 -0800 Subject: [PATCH] Remove internal uses of deprecated .typed and format --- lib/src/lazy_stream.dart | 5 ++--- lib/src/typed_stream_transformer.dart | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/src/lazy_stream.dart b/lib/src/lazy_stream.dart index f07c387..cf65a79 100644 --- a/lib/src/lazy_stream.dart +++ b/lib/src/lazy_stream.dart @@ -4,7 +4,6 @@ import "dart:async"; -import "delegate/stream.dart"; import "stream_completer.dart"; import "utils.dart"; @@ -40,10 +39,10 @@ class LazyStream extends Stream { Stream stream; if (result is Future>) { stream = StreamCompleter.fromFuture(result.then((stream) { - return DelegatingStream.typed(stream); + return stream.cast(); })); } else { - stream = DelegatingStream.typed(result as Stream); + stream = (result as Stream).cast(); } return stream.listen(onData, diff --git a/lib/src/typed_stream_transformer.dart b/lib/src/typed_stream_transformer.dart index cb63311..6a428fa 100644 --- a/lib/src/typed_stream_transformer.dart +++ b/lib/src/typed_stream_transformer.dart @@ -4,8 +4,6 @@ import 'dart:async'; -import 'delegate/stream.dart'; - /// Creates a wrapper that coerces the type of [transformer]. /// /// This soundly converts a [StreamTransformer] to a `StreamTransformer`, @@ -25,6 +23,5 @@ class _TypeSafeStreamTransformer extends StreamTransformerBase { _TypeSafeStreamTransformer(this._inner); - Stream bind(Stream stream) => - DelegatingStream.typed(_inner.bind(stream)); + Stream bind(Stream stream) => _inner.bind(stream).cast(); }