Skip to content

Commit ba019f3

Browse files
author
Max Moiseev
committed
Use _base._customContainsEquatableElement in LazyFilterX structs
1 parent dd5ba51 commit ba019f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/public/core/Filter.swift.gyb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ public struct LazyFilterSequence<Base : Sequence>
9191
if !_include(element) {
9292
return false
9393
}
94+
if let baseContains = base._customContainsEquatableElement(element) {
95+
return baseContains
96+
}
9497
return nil
9598
}
9699

@@ -169,6 +172,9 @@ public struct ${Self}<
169172
if !_predicate(element) {
170173
return false
171174
}
175+
if let baseContains = _base._customContainsEquatableElement(element) {
176+
return baseContains
177+
}
172178
return nil
173179
}
174180

0 commit comments

Comments
 (0)