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

Unified Diff: utils/pub/io.dart

Issue 11273041: Make first and last getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with co19 issue number. Created 8 years, 2 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 | « utils/lib/file_system.dart ('k') | utils/pub/yaml/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index c9029839da896a26cf2f1d4d9c621e1d38b9746c..c2f14568906fd92033c75fdd9e71d1b2c4990d43 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -44,10 +44,10 @@ String join(part1, [part2, part3, part4]) {
for (final piece in _getPath(part).split('/')) {
if (piece == '..' && parts.length > 0 &&
- parts.last() != '.' && parts.last() != '..') {
+ parts.last != '.' && parts.last != '..') {
parts.removeLast();
} else if (piece != '') {
- if (parts.length > 0 && parts.last() == '.') {
+ if (parts.length > 0 && parts.last == '.') {
parts.removeLast();
}
parts.add(piece);
@@ -506,7 +506,7 @@ Future<PubProcessResult> runProcess(String executable, List<String> args,
// TODO(rnystrom): Remove this and change to returning one string.
List<String> toLines(String output) {
var lines = output.split(NEWLINE_PATTERN);
- if (!lines.isEmpty && lines.last() == "") lines.removeLast();
+ if (!lines.isEmpty && lines.last == "") lines.removeLast();
return lines;
}
return new PubProcessResult(toLines(result.stdout),
« no previous file with comments | « utils/lib/file_system.dart ('k') | utils/pub/yaml/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698