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

Unified Diff: lib/src/stream_group.dart

Issue 2660333005: Change generic comment syntax to real generic syntax. (Closed)
Patch Set: Created 3 years, 11 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698