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

Unified Diff: pkg/scheduled_test/lib/src/schedule.dart

Issue 12335131: Make List.from default to not growable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix one more from. Created 7 years, 10 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/pathos/lib/path.dart ('k') | samples/third_party/dromaeo/Suites.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/schedule.dart
diff --git a/pkg/scheduled_test/lib/src/schedule.dart b/pkg/scheduled_test/lib/src/schedule.dart
index ac601ea984e6bc140bf3571da80ae7544c2b0804..923d261102bfa12d10a678a1aa997326608305b7 100644
--- a/pkg/scheduled_test/lib/src/schedule.dart
+++ b/pkg/scheduled_test/lib/src/schedule.dart
@@ -471,8 +471,7 @@ class TaskQueue {
var lines = task.toString().split("\n");
var firstLine = task == highlight ?
"> ${lines.first}" : "* ${lines.first}";
- lines = new List.from(lines.skip(1).map((line) => "| $line"));
- lines.insertRange(0, 1, firstLine);
+ lines = [firstLine]..addAll(lines.skip(1).map((line) => "| $line"));
return lines.join("\n");
}).join("\n");
}
« no previous file with comments | « pkg/pathos/lib/path.dart ('k') | samples/third_party/dromaeo/Suites.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698