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

Unified Diff: lib/src/stream_splitter.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_splitter.dart
diff --git a/lib/src/stream_splitter.dart b/lib/src/stream_splitter.dart
index 448fe2a26ea926e2d3b75b3c5685bdb92b62bb80..6cec98c7d4ae4bb991c4871583d96be904b95583 100644
--- a/lib/src/stream_splitter.dart
+++ b/lib/src/stream_splitter.dart
@@ -57,10 +57,9 @@ class StreamSplitter<T> {
///
/// [count] defaults to 2. This is the same as creating [count] branches and
/// then closing the [StreamSplitter].
- static List<Stream/*<T>*/> splitFrom/*<T>*/(Stream/*<T>*/ stream,
- [int count]) {
+ static List<Stream<T>> splitFrom<T>(Stream<T> stream, [int count]) {
if (count == null) count = 2;
- var splitter = new StreamSplitter/*<T>*/(stream);
+ var splitter = new StreamSplitter<T>(stream);
var streams = new List<Stream>.generate(count, (_) => splitter.split());
splitter.close();
return streams;
@@ -77,9 +76,7 @@ class StreamSplitter<T> {
}
var controller = new StreamController<T>(
- onListen: _onListen,
- onPause: _onPause,
- onResume: _onResume);
+ onListen: _onListen, onPause: _onPause, onResume: _onResume);
controller.onCancel = () => _onCancel(controller);
for (var result in _buffer) {
@@ -147,8 +144,8 @@ class StreamSplitter<T> {
// wasn't paused, this will be a no-op.
_subscription.resume();
} else {
- _subscription = _stream.listen(
- _onData, onError: _onError, onDone: _onDone);
+ _subscription =
+ _stream.listen(_onData, onError: _onError, onDone: _onDone);
}
}

Powered by Google App Engine
This is Rietveld 408576698