Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 7dad64b

Browse files
authored
fix latest pedantic lints (#107)
1 parent 478bdfa commit 7dad64b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/dom.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,7 @@ class FilteredElementList extends IterableBase<Element>
830830
//
831831
// TODO(nweiz): we don't always need to create a new list. For example
832832
// forEach, every, any, ... could directly work on the _childNodes.
833-
List<Element> get _filtered =>
834-
List<Element>.from(_childNodes.where((n) => n is Element));
833+
List<Element> get _filtered => _childNodes.whereType<Element>().toList();
835834

836835
void forEach(void f(Element element)) {
837836
_filtered.forEach(f);

test/support.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final testDataDir = p.join(testDir, 'data');
2626

2727
Iterable<String> getDataFiles(String subdirectory) {
2828
var dir = Directory(p.join(testDataDir, subdirectory));
29-
return dir.listSync().where((f) => f is File).map((f) => f.path);
29+
return dir.listSync().whereType<File>().map((f) => f.path);
3030
}
3131

3232
// TODO(jmesserly): make this class simpler. We could probably split on

0 commit comments

Comments
 (0)