Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Require Dart 3.0, update lints (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Jun 7, 2023
1 parent 1ef3e56 commit 19466c0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [2.17.0, dev]
sdk: [3.0.0, dev]
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 4.0.3-dev

* Require Dart 2.17
* Require Dart 3.0

## 4.0.2

Expand Down
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ linter:
- prefer_relative_imports
- test_types_in_equals
- unnecessary_await_in_return
- unnecessary_breaks
- use_if_null_to_convert_nulls_to_bools
- use_raw_strings
- use_string_buffers
Expand Down
8 changes: 0 additions & 8 deletions lib/src/chunked_coding/decoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class _Sink extends ByteConversionSinkBase {
_size = _digitForByte(bytes, start);
_state = _State.size;
start++;
break;

case _State.size:
if (bytes[start] == $cr) {
Expand All @@ -99,45 +98,38 @@ class _Sink extends ByteConversionSinkBase {
_size = (_size << 4) + _digitForByte(bytes, start);
}
start++;
break;

case _State.sizeBeforeLF:
assertCurrentChar($lf, 'LF');
_state = _size == 0 ? _State.endBeforeCR : _State.body;
start++;
break;

case _State.body:
final chunkEnd = math.min(end, start + _size);
buffer.addAll(bytes, start, chunkEnd);
_size -= chunkEnd - start;
start = chunkEnd;
if (_size == 0) _state = _State.bodyBeforeCR;
break;

case _State.bodyBeforeCR:
assertCurrentChar($cr, 'CR');
_state = _State.bodyBeforeLF;
start++;
break;

case _State.bodyBeforeLF:
assertCurrentChar($lf, 'LF');
_state = _State.boundary;
start++;
break;

case _State.endBeforeCR:
assertCurrentChar($cr, 'CR');
_state = _State.endBeforeLF;
start++;
break;

case _State.endBeforeLF:
assertCurrentChar($lf, 'LF');
_state = _State.end;
start++;
break;

case _State.end:
throw FormatException('Expected no more data.', bytes, start);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
repository: https://github.com/dart-lang/http_parser

environment:
sdk: '>=2.17.0 <3.0.0'
sdk: ^3.0.0

dependencies:
collection: ^1.15.0
Expand All @@ -14,5 +14,5 @@ dependencies:
typed_data: ^1.3.0

dev_dependencies:
dart_flutter_team_lints: ^0.1.0
dart_flutter_team_lints: ^1.0.0
test: ^1.16.0

0 comments on commit 19466c0

Please sign in to comment.