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

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

Issue 996683002: Fix warnings and hints in the SDK (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Take suggestions from sgjesse Created 5 years, 9 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/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream_impl.dart
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index 3f77294619a6e3d3b1e23f7794fc6b51e8700e95..92fd7a957f7434e5752a3e9dc96fbf832f5c27e5 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -998,24 +998,25 @@ class _StreamIteratorImpl<T> implements StreamIterator<T> {
_current = null;
_futureOrPrefetch = new _Future<bool>();
return _futureOrPrefetch;
- } else {
- assert(_state >= _STATE_EXTRA_DATA);
- switch (_state) {
- case _STATE_EXTRA_DATA:
- _state = _STATE_FOUND;
- _current = _futureOrPrefetch;
- _futureOrPrefetch = null;
- _subscription.resume();
- return new _Future<bool>.immediate(true);
- case _STATE_EXTRA_ERROR:
- AsyncError prefetch = _futureOrPrefetch;
- _clear();
- return new _Future<bool>.immediateError(prefetch.error,
- prefetch.stackTrace);
- case _STATE_EXTRA_DONE:
- _clear();
- return new _Future<bool>.immediate(false);
- }
+ }
+ assert(_state >= _STATE_EXTRA_DATA);
+ switch (_state) {
+ case _STATE_EXTRA_DATA:
+ _state = _STATE_FOUND;
+ _current = _futureOrPrefetch;
+ _futureOrPrefetch = null;
+ _subscription.resume();
+ return new _Future<bool>.immediate(true);
+ case _STATE_EXTRA_ERROR:
+ AsyncError prefetch = _futureOrPrefetch;
+ _clear();
+ return new _Future<bool>.immediateError(prefetch.error,
+ prefetch.stackTrace);
+ case _STATE_EXTRA_DONE:
+ _clear();
+ return new _Future<bool>.immediate(false);
+ default:
+ throw "Unreachable";
}
}
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698