Skip to content

Commit bf8a9c1

Browse files
gmpassosCommit Queue
authored andcommitted
_Visitor.visitBinaryExpression: use const and avoid List allocation.
Closes #56451 GitOrigin-RevId: c4a5b59 Change-Id: I2fdbec08261f61a9f4242acf35b92ff15fc74227 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380201 Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Phil Quitslund <[email protected]>
1 parent 212e49f commit bf8a9c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/linter/lib/src/rules/prefer_contains.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class _Visitor extends SimpleAstVisitor<void> {
6969
@override
7070
void visitBinaryExpression(BinaryExpression node) {
7171
// This lint rule is only concerned with these operators.
72-
if (!node.operator.matchesAny([
72+
if (!node.operator.matchesAny(const [
7373
TokenType.EQ_EQ,
7474
TokenType.BANG_EQ,
7575
TokenType.GT,

0 commit comments

Comments
 (0)