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

Unified Diff: sdk/lib/async/stream.dart

Issue 14172013: Remove second generic argument of StreamConsumer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream.dart
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 7507878ed333849854f32d9cf63a20110d086c68..a53b1dd1962933fbe3f9abe39a75ccdebf13bbb2 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -236,7 +236,7 @@ abstract class Stream<T> {
/**
* Binds this stream as the input of the provided [StreamConsumer].
*/
- Future pipe(StreamConsumer<T, dynamic> streamConsumer) {
+ Future pipe(StreamConsumer<T> streamConsumer) {
// TODO(floitsch): switch to:
// streamConsumer.addStream(this).then((_) => streamConsumer.close());
return streamConsumer.consume(this);
@@ -888,10 +888,7 @@ class EventSinkView<T> extends EventSink<T> {
* the resulting [Future]. The pipe should complete the future when it's
* done.
*/
-abstract class StreamConsumer<S, T> {
- // TODO(floitsch): generic types.
- // Currently not possible to add generic types, since they clash with other
- // types that have already been used.
+abstract class StreamConsumer<S> {
Future addStream(Stream<S> stream);
Future close();
@@ -899,7 +896,7 @@ abstract class StreamConsumer<S, T> {
/**
* Consume is deprecated. Use [addStream] followed by [close] instead.
*/
- Future<T> consume(Stream<S> stream);
+ Future consume(Stream<S> stream);
}
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698