Skip to content

Commit

Permalink
Stop implementing ChunkedConverter.
Browse files Browse the repository at this point in the history
This was deprecated in Dart 1.17, and its members were changed such that
we can no longer implement it and be strong-mode clean.

R=kevmoo@google.com

Review URL: https://codereview.chromium.org//2031873006 .
  • Loading branch information
nex3 committed Jun 3, 2016
1 parent b82b3fb commit 92ac5f1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,11 @@
## 2.0.0

**Note**: No new APIs have been added in 2.0.0. Packages that would use 2.0.0 as
a lower bound should use 1.0.0 instead—for example, `convert: ">=1.0.0 <3.0.0"`.

* `HexDecoder`, `HexEncoder`, `PercentDecoder`, and `PercentEncoder` no longer
extend `ChunkedConverter`.

## 1.1.1

* Fix all strong-mode warnings.
Expand Down
3 changes: 1 addition & 2 deletions lib/src/hex/decoder.dart
Expand Up @@ -17,8 +17,7 @@ const hexDecoder = const HexDecoder._();
/// Because two hexadecimal digits correspond to a single byte, this will throw
/// a [FormatException] if given an odd-length string. It will also throw a
/// [FormatException] if given a string containing non-hexadecimal code units.
class HexDecoder
extends ChunkedConverter<String, List<int>, String, List<int>> {
class HexDecoder extends Converter<String, List<int>> {
const HexDecoder._();

List<int> convert(String string) {
Expand Down
3 changes: 1 addition & 2 deletions lib/src/hex/encoder.dart
Expand Up @@ -16,8 +16,7 @@ const hexEncoder = const HexEncoder._();
///
/// This will throw a [RangeError] if the byte array has any digits that don't
/// fit in the gamut of a byte.
class HexEncoder
extends ChunkedConverter<List<int>, String, List<int>, String> {
class HexEncoder extends Converter<List<int>, String> {
const HexEncoder._();

String convert(List<int> bytes) => _convert(bytes, 0, bytes.length);
Expand Down
3 changes: 1 addition & 2 deletions lib/src/percent/decoder.dart
Expand Up @@ -25,8 +25,7 @@ const _lastPercent = -1;
///
/// This will throw a [FormatException] if the input string has an incomplete
/// percent-encoding, or if it contains non-ASCII code units.
class PercentDecoder
extends ChunkedConverter<String, List<int>, String, List<int>> {
class PercentDecoder extends Converter<String, List<int>> {
const PercentDecoder._();

List<int> convert(String string) {
Expand Down
3 changes: 1 addition & 2 deletions lib/src/percent/encoder.dart
Expand Up @@ -19,8 +19,7 @@ const percentEncoder = const PercentEncoder._();
///
/// This will throw a [RangeError] if the byte array has any digits that don't
/// fit in the gamut of a byte.
class PercentEncoder
extends ChunkedConverter<List<int>, String, List<int>, String> {
class PercentEncoder extends Converter<List<int>, String> {
const PercentEncoder._();

String convert(List<int> bytes) => _convert(bytes, 0, bytes.length);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
@@ -1,11 +1,11 @@
name: convert
version: 1.1.1
version: 2.0.0
description: Utilities for converting between data representations.
author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/convert

environment:
sdk: '>=1.16.0 <2.0.0'
sdk: '>=1.17.0-dev.6.2 <2.0.0'

dependencies:
charcode: '^1.1.0'
Expand Down

0 comments on commit 92ac5f1

Please sign in to comment.