Skip to content

Commit 7563eb7

Browse files
committed
Call factory directly to evaluate string
1 parent d5236f2 commit 7563eb7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Sources/StringContainsOperators/StringContainsOperators.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public extension String {
9898
/// - Returns: `true` if the string contains the `StringPredicate`, `false` otherwise.
9999
func contains(_ predicate: StringPredicate) -> Bool {
100100

101-
let strategy = SearchStrategyMaker.make(predicate: predicate)
102-
return strategy.evaluate(string: self)
101+
SearchStrategyMaker
102+
.make(predicate: predicate)
103+
.evaluate(string: self)
103104
}
104105
}

0 commit comments

Comments
 (0)