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

Unified Diff: lib/src/stream_group.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/stream_completer.dart ('k') | lib/src/stream_queue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/stream_group.dart
diff --git a/lib/src/stream_group.dart b/lib/src/stream_group.dart
index 6239fc232fe2a8abf0f29009b821ec063278a7a3..889ccd82685af96a2e5933b9228231804bd50bc6 100644
--- a/lib/src/stream_group.dart
+++ b/lib/src/stream_group.dart
@@ -12,8 +12,8 @@ import 'dart:async';
/// this means that events emitted by broadcast streams will be dropped until
/// [stream] has a listener.**
///
-/// If the `StreamGroup` is constructed using [new StreamGroup], [stream] will be
-/// single-subscription. In this case, if [stream] is paused or canceled, all
+/// If the `StreamGroup` is constructed using [new StreamGroup], [stream] will
+/// be single-subscription. In this case, if [stream] is paused or canceled, all
/// streams in the group will likewise be paused or canceled, respectively.
///
/// If the `StreamGroup` is constructed using [new StreamGroup.broadcast],
@@ -53,8 +53,8 @@ class StreamGroup<T> implements Sink<Stream<T>> {
///
/// This is equivalent to adding [streams] to a group, closing that group, and
/// returning its stream.
- static Stream merge(Iterable<Stream> streams) {
- var group = new StreamGroup();
+ static Stream/*<T>*/ merge/*<T>*/(Iterable<Stream/*<T>*/> streams) {
+ var group = new StreamGroup/*<T>*/();
streams.forEach(group.add);
group.close();
return group.stream;
@@ -192,7 +192,7 @@ class StreamGroup<T> implements Sink<Stream<T>> {
/// Starts actively forwarding events from [stream] to [_controller].
///
/// This will pause the resulting subscription if [this] is paused.
- StreamSubscription _listenToStream(Stream stream) {
+ StreamSubscription<T> _listenToStream(Stream<T> stream) {
var subscription = stream.listen(
_controller.add,
onError: _controller.addError,
« no previous file with comments | « lib/src/stream_completer.dart ('k') | lib/src/stream_queue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698