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

Unified Diff: packages/collection/lib/src/utils.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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 | « packages/collection/lib/src/unmodifiable_wrappers.dart ('k') | packages/collection/lib/src/wrappers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/collection/lib/src/utils.dart
diff --git a/packages/collection/lib/src/utils.dart b/packages/collection/lib/src/utils.dart
index c9c753777f07c1c5bd930fa4a3a7e32a5377db0f..194f99c484fc617802200d7a98b822e4184c293b 100644
--- a/packages/collection/lib/src/utils.dart
+++ b/packages/collection/lib/src/utils.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library dart.pkg.collection.utils;
-
/// A pair of values.
class Pair<E, F> {
E first;
@@ -11,3 +9,7 @@ class Pair<E, F> {
Pair(this.first, this.last);
}
+
+/// Returns a [Comparator] that asserts that its first argument is comparable.
+Comparator<T> defaultCompare<T>() =>
+ (value1, value2) => (value1 as Comparable).compareTo(value2);
« no previous file with comments | « packages/collection/lib/src/unmodifiable_wrappers.dart ('k') | packages/collection/lib/src/wrappers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698