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

Unified Diff: corelib/src/implementation/collections.dart

Issue 10653002: Fix some warnings in the core library identified by the static analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 6 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 | « corelib/src/future.dart ('k') | corelib/src/string_buffer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/implementation/collections.dart
diff --git a/corelib/src/implementation/collections.dart b/corelib/src/implementation/collections.dart
index 162f6422b197d77e7ee3e51f4b72f07982e33945..462d33af2a703382ecf34f320b5b8d8ca1a0913a 100644
--- a/corelib/src/implementation/collections.dart
+++ b/corelib/src/implementation/collections.dart
@@ -8,45 +8,41 @@
* method.
*/
class Collections {
- static void forEach(Iterable<Object> iterable, void f(Object o)) {
+ static void forEach(Iterable iterable, void f(o)) {
for (final e in iterable) {
f(e);
}
}
- static bool some(Iterable<Object> iterable, bool f(Object o)) {
+ static bool some(Iterable iterable, bool f(o)) {
for (final e in iterable) {
if (f(e)) return true;
}
return false;
}
- static bool every(Iterable<Object> iterable, bool f(Object o)) {
+ static bool every(Iterable iterable, bool f(o)) {
for (final e in iterable) {
if (!f(e)) return false;
}
return true;
}
- static List<Object> map(Iterable<Object> source,
- List<Object> destination,
- f(Object o)) {
+ static List map(Iterable source, List destination, f(o)) {
for (final e in source) {
destination.add(f(e));
}
return destination;
}
- static List<Object> filter(Iterable<Object> source,
- List<Object> destination,
- bool f(Object o)) {
+ static List filter(Iterable source, List destination, bool f(o)) {
for (final e in source) {
if (f(e)) destination.add(e);
}
return destination;
}
- static bool isEmpty(Iterable<Object> iterable) {
+ static bool isEmpty(Iterable iterable) {
return !iterable.iterator().hasNext();
}
« no previous file with comments | « corelib/src/future.dart ('k') | corelib/src/string_buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698