Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Remove internal uses of deprecated .typed and format
Browse files Browse the repository at this point in the history
  • Loading branch information
leafpetersen committed Mar 2, 2018
1 parent 023eb0d commit 6f3e6fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions lib/src/lazy_stream.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import "dart:async";

import "delegate/stream.dart";
import "stream_completer.dart";
import "utils.dart";

Expand Down Expand Up @@ -40,10 +39,10 @@ class LazyStream<T> extends Stream<T> {
Stream<T> stream;
if (result is Future<Stream<T>>) {
stream = StreamCompleter.fromFuture(result.then((stream) {
return DelegatingStream.typed<T>(stream);
return stream.cast<T>();
}));
} else {
stream = DelegatingStream.typed<T>(result as Stream);
stream = (result as Stream).cast<T>();
}

return stream.listen(onData,
Expand Down
5 changes: 1 addition & 4 deletions lib/src/typed_stream_transformer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<S, T>`,
Expand All @@ -25,6 +23,5 @@ class _TypeSafeStreamTransformer<S, T> extends StreamTransformerBase<S, T> {

_TypeSafeStreamTransformer(this._inner);

Stream<T> bind(Stream<S> stream) =>
DelegatingStream.typed(_inner.bind(stream));
Stream<T> bind(Stream<S> stream) => _inner.bind(stream).cast();
}

0 comments on commit 6f3e6fc

Please sign in to comment.