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

Unified Diff: lib/src/asset/asset_node.dart

Issue 1947773002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/barback@master
Patch Set: Code review changes Created 4 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 | « CHANGELOG.md ('k') | lib/src/asset/asset_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/asset/asset_node.dart
diff --git a/lib/src/asset/asset_node.dart b/lib/src/asset/asset_node.dart
index 45d1b1771c215f165a2e3c001afb4a7ee5715e00..bab955fa21f613a15a4f520896a7c00a1a3ca55d 100644
--- a/lib/src/asset/asset_node.dart
+++ b/lib/src/asset/asset_node.dart
@@ -8,7 +8,6 @@ import 'dart:async';
import '../errors.dart';
import '../graph/transform_node.dart';
-import '../utils.dart';
import 'asset.dart';
import 'asset_id.dart';
@@ -115,9 +114,9 @@ class AssetNode {
/// [callback] is called synchronously if this is already in such a state.
///
/// The return value of [callback] is piped to the returned Future.
- Future _waitForState(bool test(AssetState state),
- callback(AssetState state)) {
- if (test(state)) return syncFuture(() => callback(state));
+ Future/*<T>*/ _waitForState/*<T>*/(bool test(AssetState state),
+ /*=T*/ callback(AssetState state)) {
+ if (test(state)) return new Future.sync(() => callback(state));
return onStateChange.firstWhere(test).then((_) => callback(state));
}
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/asset/asset_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698