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

Unified Diff: lib/src/operator_matchers.dart

Issue 1834543002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/matcher@master
Patch Set: Created 4 years, 9 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 | « lib/src/iterable_matchers.dart ('k') | lib/src/util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/operator_matchers.dart
diff --git a/lib/src/operator_matchers.dart b/lib/src/operator_matchers.dart
index 6824c5ba9eeff19da81a33010142948544744960..f0a4c086108827787f297ffefb702acc202b8db3 100644
--- a/lib/src/operator_matchers.dart
+++ b/lib/src/operator_matchers.dart
@@ -90,24 +90,8 @@ class _AnyOf extends Matcher {
description.addAll('(', ' or ', ')', _matchers);
}
-List<Matcher> _wrapArgs(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
- Iterable<Matcher> matchers;
- if (arg0 is List) {
- if (arg1 != null ||
- arg2 != null ||
- arg3 != null ||
- arg4 != null ||
- arg5 != null ||
- arg6 != null) {
- throw new ArgumentError('If arg0 is a List, all other arguments must be'
- ' null.');
- }
-
- matchers = arg0;
- } else {
- matchers =
- [arg0, arg1, arg2, arg3, arg4, arg5, arg6].where((e) => e != null);
- }
-
- return matchers.map((e) => wrapMatcher(e)).toList();
-}
+List<Matcher> _wrapArgs(arg0, arg1, arg2, arg3, arg4, arg5, arg6) =>
+ [arg0, arg1, arg2, arg3, arg4, arg5, arg6]
+ .where((e) => e != null)
+ .map((e) => wrapMatcher(e))
+ .toList();
« no previous file with comments | « lib/src/iterable_matchers.dart ('k') | lib/src/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698