Require Dart >=2.14 (#351)
Also drop use of quiver
diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml
index 4a3b23d..c906867 100644
--- a/.github/workflows/test-package.yml
+++ b/.github/workflows/test-package.yml
@@ -47,7 +47,7 @@
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
- sdk: [2.12.0, dev]
+ sdk: [2.14.0, dev]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c6b7bb..ecca0fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@
ignore line annotations.
* Use the `reportLines` flag in `vm_service`'s `getSourceReport` RPC. This
typically halves the number of RPCs that the coverage collector needs to run.
+* Require Dart `>=2.14.0`
## 1.0.3 - 2021-05-25
diff --git a/lib/src/chrome.dart b/lib/src/chrome.dart
index ca429ba..770e287 100644
--- a/lib/src/chrome.dart
+++ b/lib/src/chrome.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:coverage/src/hitmap.dart';
-import 'package:coverage/src/util.dart';
import 'package:source_maps/parser.dart';
/// Returns a Dart based hit-map containing coverage report for the provided
@@ -162,7 +161,7 @@
final int column;
@override
- int get hashCode => hash2(line, column);
+ int get hashCode => Object.hash(line, column);
@override
bool operator ==(dynamic o) =>
diff --git a/lib/src/util.dart b/lib/src/util.dart
index 14ba7d5..ff507d1 100644
--- a/lib/src/util.dart
+++ b/lib/src/util.dart
@@ -73,22 +73,6 @@
}
}
-/// Generates a hash code for two objects.
-int hash2(dynamic a, dynamic b) =>
- _finish(_combine(_combine(0, a.hashCode), b.hashCode));
-
-int _combine(int hash, int value) {
- hash = 0x1fffffff & (hash + value);
- hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
- return hash ^ (hash >> 6);
-}
-
-int _finish(int hash) {
- hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
- hash = hash ^ (hash >> 11);
- return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
-}
-
const muliLineIgnoreStart = '// coverage:ignore-start';
const muliLineIgnoreEnd = '// coverage:ignore-end';
const singleLineIgnore = '// coverage:ignore-line';
diff --git a/pubspec.yaml b/pubspec.yaml
index 2b89721..effe984 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -4,7 +4,7 @@
homepage: https://github.com/dart-lang/coverage
environment:
- sdk: '>=2.12.0 <3.0.0'
+ sdk: '>=2.14.0 <3.0.0'
dependencies:
args: ^2.0.0