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

Unified Diff: lib/src/utils/multiset.dart

Issue 1947773002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/barback@master
Patch Set: Code review changes Created 4 years, 7 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/utils/file_pool.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils/multiset.dart
diff --git a/lib/src/utils/multiset.dart b/lib/src/utils/multiset.dart
index 20d1c57e04a18098bda124a038bf68f52b096c25..4b3edea35a48b896467b509fadedbb3ffe53d8e8 100644
--- a/lib/src/utils/multiset.dart
+++ b/lib/src/utils/multiset.dart
@@ -23,9 +23,10 @@ class Multiset<E> extends IterableBase<E> {
final _map = new Map<E, int>();
Iterator<E> get iterator {
- return _map.keys.expand((element) {
- return new Iterable.generate(_map[element], (_) => element);
- }).iterator;
+ return _map.keys
+ .expand((element) =>
+ new Iterable<E>.generate(_map[element], (_) => element))
+ .iterator;
}
Multiset()
@@ -56,7 +57,7 @@ class Multiset<E> extends IterableBase<E> {
}
/// Returns whether [value] is in the set.
- bool contains(E value) => _map.containsKey(value);
+ bool contains(Object value) => _map.containsKey(value);
/// Returns the number of copies of [value] in the set.
int count(E value) => _map.containsKey(value) ? _map[value] : 0;
« no previous file with comments | « lib/src/utils/file_pool.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698