Skip to content

Commit

Permalink
Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
scheglov committed Sep 1, 2021
1 parent f1c1044 commit 93a5ef7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/async/stream_buffer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class StreamBuffer<T> implements StreamConsumer<List<T>> {
final streamDone = Completer<Null>();
_sub = stream.listen((items) {
_chunks.addAll(items);
_counter += items is List ? items.length : 1;
_counter += items.length;
if (limited && _counter >= limit) {
_sub!.pause();
}
Expand Down
2 changes: 1 addition & 1 deletion test/collection/delegates/iterable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void main() {
});

test('every', () {
expect(delegatingIterable.every((e) => e is String), isTrue);
expect(delegatingIterable.every((e) => true), isTrue);
expect(delegatingIterable.every((e) => e == 'b'), isFalse);
});

Expand Down

0 comments on commit 93a5ef7

Please sign in to comment.