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

Unified Diff: pkg/pathos/lib/path.dart

Issue 12328104: Change new List(n) to return fixed length list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. 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
Index: pkg/pathos/lib/path.dart
diff --git a/pkg/pathos/lib/path.dart b/pkg/pathos/lib/path.dart
index 639bab5e660390091e887f9d93dec91f62413128..2b6fe471ee181dec6a5d49b34ba4306e3c737ffe 100644
--- a/pkg/pathos/lib/path.dart
+++ b/pkg/pathos/lib/path.dart
@@ -406,7 +406,8 @@ class Builder {
List<String> split(String path) {
var parsed = _parse(path);
// Filter out empty parts that exist due to multiple separators in a row.
- parsed.parts = parsed.parts.where((part) => !part.isEmpty).toList();
+ parsed.parts = parsed.parts.where((part) => !part.isEmpty)
+ .toList(growable: true);
if (parsed.root != null) parsed.parts.insertRange(0, 1, parsed.root);
return parsed.parts;
}

Powered by Google App Engine
This is Rietveld 408576698