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

Unified Diff: pkg/args/lib/args.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/args/lib/args.dart
diff --git a/pkg/args/lib/args.dart b/pkg/args/lib/args.dart
index 12ea74549cc3ee87a4a9e8a06947ccc4af64b9c9..0cb81961a3ec2c1743f09a9138c389eb3e3013c1 100644
--- a/pkg/args/lib/args.dart
+++ b/pkg/args/lib/args.dart
@@ -353,7 +353,7 @@ class ArgParser {
_setOption(Map results, _Option option, value) {
// See if it's one of the allowed values.
if (option.allowed != null) {
- _validate(option.allowed.some((allow) => allow == value),
+ _validate(option.allowed.any((allow) => allow == value),
'"$value" is not an allowed value for option "${option.name}".');
}
@@ -544,7 +544,7 @@ class ArgResults {
}
/** Get the names of the options as a [Collection]. */
- Collection<String> get options => _options.keys;
+ Collection<String> get options => _options.keys.toList();
}
class _Option {
@@ -630,8 +630,8 @@ class _Usage {
if (option.help != null) write(2, option.help);
if (option.allowedHelp != null) {
- var allowedNames = option.allowedHelp.keys;
- allowedNames.sort((a, b) => a.compareTo(b));
+ var allowedNames = option.allowedHelp.keys.toList();
+ allowedNames.sort();
newline();
for (var name in allowedNames) {
write(1, getAllowedTitle(name));

Powered by Google App Engine
This is Rietveld 408576698