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

Unified Diff: pkg/barback/test/transformer/log.dart

Issue 243793005: Don't require Transformer methods to return Futures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 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 | « pkg/barback/test/transformer/lazy_rewrite.dart ('k') | pkg/barback/test/transformer/many_to_one.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/transformer/log.dart
diff --git a/pkg/barback/test/transformer/log.dart b/pkg/barback/test/transformer/log.dart
index 7866722c044afbc6319a2d585a2b1a1309cf37db..4e3dd72d5424428a19fc083dc10fb6305131a934 100644
--- a/pkg/barback/test/transformer/log.dart
+++ b/pkg/barback/test/transformer/log.dart
@@ -22,22 +22,20 @@ class LogTransformer extends MockTransformer {
LogTransformer(this._entries);
- Future<bool> doIsPrimary(_) => new Future.value(true);
-
- Future doApply(Transform transform) {
- return newFuture(() {
- for (var entry in _entries) {
- var parts = entry.split(":");
- var logFn;
- switch (parts[0]) {
- case "error": logFn = transform.logger.error; break;
- case "warning": logFn = transform.logger.warning; break;
- case "info": logFn = transform.logger.info; break;
- case "fine": logFn = transform.logger.fine; break;
- }
-
- logFn(parts[1].trim());
+ bool doIsPrimary(AssetId id) => true;
+
+ void doApply(Transform transform) {
+ for (var entry in _entries) {
+ var parts = entry.split(":");
+ var logFn;
+ switch (parts[0]) {
+ case "error": logFn = transform.logger.error; break;
+ case "warning": logFn = transform.logger.warning; break;
+ case "info": logFn = transform.logger.info; break;
+ case "fine": logFn = transform.logger.fine; break;
}
- });
+
+ logFn(parts[1].trim());
+ }
}
}
« no previous file with comments | « pkg/barback/test/transformer/lazy_rewrite.dart ('k') | pkg/barback/test/transformer/many_to_one.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698