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

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

Issue 2885993005: Fix Stream.distinct. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | sdk/lib/async/stream_pipe.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 64a525f1f30dcd6d7ae258c35bc761661c8f4ab5..9c83e1966b0b45694808dc2dc7423e113a458c75 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -1022,10 +1022,17 @@ abstract class Stream<T> {
*
* The returned stream provides the same events as this stream, except
* that it never provides two consecutive data events that are equal.
+ * That is, errors are passed through to the returned stream, and
+ * data events are passed through if they are distinct from the most
+ * recently emitted data event.
*
* Equality is determined by the provided [equals] method. If that is
* omitted, the '==' operator on the last provided data element is used.
*
+ * If [equals] throws, the data event is replaced by an error event
+ * containing the thrown error. The behavior is equivalent to the
+ * original stream emitting the error event.
+ *
* The returned stream is a broadcast stream if this stream is.
* If a broadcast stream is listened to more than once, each subscription
* will individually perform the `equals` test.
« no previous file with comments | « no previous file | sdk/lib/async/stream_pipe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698