stdlib: More SE-0193 updates

This commit is contained in:
Slava Pestov
2018-04-24 19:48:20 -07:00
parent dae966c8f8
commit 28ce9204fe
3 changed files with 2 additions and 4 deletions

View File

@@ -436,7 +436,6 @@ extension StringProtocol where Index == String.Index {
// self can be a Substring so we need to subtract/add this offset when
// passing _ns to the Foundation APIs. Will be 0 if self is String.
@inlinable
@usableFromInline
internal var _substringOffset: Int {
return self.startIndex.encodedOffset
}
@@ -448,7 +447,6 @@ extension StringProtocol where Index == String.Index {
}
@inlinable
@usableFromInline
internal func _toRelativeNSRange(_ r: Range<String.Index>) -> NSRange {
return NSRange(
location: r.lowerBound.encodedOffset - _substringOffset,