Use the new Uint8Buffer.addAll start and end params.
R=lrn@google.com
Review URL: https://codereview.chromium.org//1411123012 .
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd213b1..0c56ab1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,7 @@
-# Changelog
+## 1.0.1
+
+* Small improvement in percent decoder efficiency.
## 1.0.0
-- Initial version
+* Initial version
diff --git a/lib/src/percent/decoder.dart b/lib/src/percent/decoder.dart
index 0740636..4d8f994 100644
--- a/lib/src/percent/decoder.dart
+++ b/lib/src/percent/decoder.dart
@@ -199,7 +199,7 @@
// than can be copied to the buffer as-is.
if (i > sliceStart) {
_checkForInvalidCodeUnit(codeUnitOr, codeUnits, sliceStart, i);
- buffer.addAll(codeUnits.getRange(sliceStart, i));
+ buffer.addAll(codeUnits, sliceStart, i);
}
// Now decode the percent-encoded byte and add it as well.
@@ -222,7 +222,7 @@
if (start == sliceStart) {
buffer.addAll(codeUnits);
} else {
- buffer.addAll(codeUnits.getRange(sliceStart, end));
+ buffer.addAll(codeUnits, sliceStart, end);
}
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 48ef140..0dc393b 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: convert
-version: 1.0.0
+version: 1.0.1
description: Utilities for converting between data representations.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/convert
@@ -9,7 +9,7 @@
dependencies:
charcode: '^1.1.0'
- typed_data: '^1.0.0'
+ typed_data: '^1.1.0'
dev_dependencies:
test: '^0.12.0'