Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Unified Diff: lib/src/stream_completer.dart

Issue 1841223002: Fix most strong mode warnings. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Code review changes Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/single_subscription_transformer.dart ('k') | lib/src/stream_group.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/stream_completer.dart
diff --git a/lib/src/stream_completer.dart b/lib/src/stream_completer.dart
index 73557b2acf1c9dc39d3414c932b99adedbb8226b..953985e387090eba8df812131ee5fac8cac485ac 100644
--- a/lib/src/stream_completer.dart
+++ b/lib/src/stream_completer.dart
@@ -24,7 +24,7 @@ import "dart:async";
/// the listen is performed directly on the source stream.
class StreamCompleter<T> {
/// The stream doing the actual work, is returned by [stream].
- final _CompleterStream _stream = new _CompleterStream<T>();
+ final _stream = new _CompleterStream<T>();
/// Convert a `Future<Stream>` to a `Stream`.
///
@@ -34,8 +34,8 @@ class StreamCompleter<T> {
///
/// If the future completes with an error, the returned stream will
/// instead contain just that error.
- static Stream fromFuture(Future<Stream> streamFuture) {
- var completer = new StreamCompleter();
+ static Stream/*<T>*/ fromFuture/*<T>*/(Future<Stream/*<T>*/> streamFuture) {
+ var completer = new StreamCompleter/*<T>*/();
streamFuture.then(completer.setSourceStream,
onError: completer.setError);
return completer.stream;
@@ -109,13 +109,13 @@ class _CompleterStream<T> extends Stream<T> {
///
/// Created if the user listens on this stream before the source stream
/// is set, or if using [_setEmpty] so there is no source stream.
- StreamController _controller;
+ StreamController<T> _controller;
/// Source stream for the events provided by this stream.
///
/// Set when the completer sets the source stream using [_setSourceStream]
/// or [_setEmpty].
- Stream _sourceStream;
+ Stream<T> _sourceStream;
StreamSubscription<T> listen(onData(T data),
{Function onError,
« no previous file with comments | « lib/src/single_subscription_transformer.dart ('k') | lib/src/stream_group.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698