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); |
} |
} |