Skip to content

Commit 2433837

Browse files
Merge pull request #1640 from airspeedswift/more-assertive
[for stdlib] Switch _sanityCheck for assert
2 parents b2b14cc + 9d0db7a commit 2433837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSStringAPI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ extension StringProtocol where Index == String.Index {
16371637
public func contains<T : StringProtocol>(_ other: T) -> Bool {
16381638
let r = self.range(of: other) != nil
16391639
if #available(macOS 10.10, iOS 8.0, *) {
1640-
_sanityCheck(r == _ns.contains(other._ephemeralString))
1640+
assert(r == _ns.contains(other._ephemeralString))
16411641
}
16421642
return r
16431643
}
@@ -1660,7 +1660,7 @@ extension StringProtocol where Index == String.Index {
16601660
of: other, options: .caseInsensitive, locale: Locale.current
16611661
) != nil
16621662
if #available(macOS 10.10, iOS 8.0, *) {
1663-
_sanityCheck(r ==
1663+
assert(r ==
16641664
_ns.localizedCaseInsensitiveContains(other._ephemeralString))
16651665
}
16661666
return r

0 commit comments

Comments
 (0)