We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d8f400 commit 39c9d97Copy full SHA for 39c9d97
Source/SwiftLintBuiltInRules/Rules/Performance/ContainsOverFirstNotNilRule.swift
@@ -8,10 +8,6 @@ struct ContainsOverFirstNotNilRule: Rule {
8
identifier: "contains_over_first_not_nil",
9
name: "Contains over First not Nil",
10
description: "Prefer `contains` over `first(where:) != nil` and `firstIndex(where:) != nil`.",
11
- rationale: """
12
- `filter` always needs to scan the entire collection, whereas `contains` can exit early as
13
- soon as a match is found.
14
- """,
15
kind: .performance,
16
nonTriggeringExamples: ["first", "firstIndex"].flatMap { method in
17
[
0 commit comments