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

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

Issue 2993093002: package barback: Update the comment style generic syntax. (Closed)
Patch Set: fix code Created 3 years, 4 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 | lib/src/graph/package_graph.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 4924bbf21bd907a1579964ddbe60c14c0e29285a..629599c06ed7e6112f6aa52b4e8ee56fab10b5ce 100644
--- a/lib/src/asset/asset_node.dart
+++ b/lib/src/asset/asset_node.dart
@@ -83,7 +83,7 @@ class AssetNode {
/// The return value of [callback] is piped to the returned Future. If the
/// asset is removed before becoming available, the returned future will throw
/// an [AssetNotFoundException].
- Future/*<T>*/ whenAvailable/*<T>*/(/*=T*/ callback(Asset asset)) {
+ Future<T> whenAvailable<T>(T callback(Asset asset)) {
return _waitForState((state) => state.isAvailable || state.isRemoved,
(state) {
if (state.isRemoved) throw new AssetNotFoundException(id);
@@ -114,9 +114,8 @@ 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/*<T>*/ _waitForState/*<T>*/(
- bool test(AssetState state),
- /*=T*/ callback(AssetState 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 | « no previous file | lib/src/graph/package_graph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698