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

Unified Diff: utils/pub/validator/name.dart

Issue 12382031: Make pub warning-clean. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « utils/pub/utils.dart ('k') | utils/pub/version_solver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/validator/name.dart
diff --git a/utils/pub/validator/name.dart b/utils/pub/validator/name.dart
index cdb08c4d3a5f1676f08fa1aadeec22893f3fbc33..c953d78b282fea79b22b43911b43ee2bbd6f725e 100644
--- a/utils/pub/validator/name.dart
+++ b/utils/pub/validator/name.dart
@@ -91,12 +91,12 @@ class NameValidator extends Validator {
var lastMatchEnd = 0;
for (var match in new RegExp(r"[a-z]([A-Z])").allMatches(source)) {
builder
- ..add(source.substring(lastMatchEnd, match.start + 1))
- ..add("_")
- ..add(match.group(1).toLowerCase());
+ ..write(source.substring(lastMatchEnd, match.start + 1))
+ ..write("_")
+ ..write(match.group(1).toLowerCase());
lastMatchEnd = match.end;
}
- builder.add(source.substring(lastMatchEnd));
+ builder.write(source.substring(lastMatchEnd));
return builder.toString().toLowerCase();
}
}
« no previous file with comments | « utils/pub/utils.dart ('k') | utils/pub/version_solver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698