Index: lib/src/stream_group.dart |
diff --git a/lib/src/stream_group.dart b/lib/src/stream_group.dart |
index 889ccd82685af96a2e5933b9228231804bd50bc6..6361a5cb96f78bd4341dce75415d05a84c6f33e3 100644 |
--- a/lib/src/stream_group.dart |
+++ b/lib/src/stream_group.dart |
@@ -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/*<T>*/ merge/*<T>*/(Iterable<Stream/*<T>*/> streams) { |
- var group = new StreamGroup/*<T>*/(); |
+ static Stream<T> merge<T>(Iterable<Stream<T>> streams) { |
+ var group = new StreamGroup<T>(); |
streams.forEach(group.add); |
group.close(); |
return group.stream; |
@@ -73,9 +73,7 @@ class StreamGroup<T> implements Sink<Stream<T>> { |
/// Creates a new stream group where [stream] is a broadcast stream. |
StreamGroup.broadcast() { |
_controller = new StreamController<T>.broadcast( |
- onListen: _onListen, |
- onCancel: _onCancelBroadcast, |
- sync: true); |
+ onListen: _onListen, onCancel: _onCancelBroadcast, sync: true); |
} |
/// Adds [stream] as a member of this group. |
@@ -193,10 +191,8 @@ class StreamGroup<T> implements Sink<Stream<T>> { |
/// |
/// This will pause the resulting subscription if [this] is paused. |
StreamSubscription<T> _listenToStream(Stream<T> stream) { |
- var subscription = stream.listen( |
- _controller.add, |
- onError: _controller.addError, |
- onDone: () => remove(stream)); |
+ var subscription = stream.listen(_controller.add, |
+ onError: _controller.addError, onDone: () => remove(stream)); |
if (_state == _StreamGroupState.paused) subscription.pause(); |
return subscription; |
} |