Skip to content

Commit 581b6f5

Browse files
committed
Remove String.UTF16Index extension in Swift >= 3.2
String.UTF16Index is now a typealias to String.Index and does not conform to Strideable anymore. This closes #39.
1 parent fd056b3 commit 581b6f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/RandomKit/Extensions/Swift/Strideable+RandomKit.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ extension Strideable where Self: RandomInClosedRange, Stride: RandomThroughValue
4545

4646
}
4747

48+
#if !swift(>=3.2)
4849
extension String.UTF16Index: RandomInRange, RandomInClosedRange {
4950
}
51+
#endif
5052

5153
extension UnsafePointer: RandomInRange, RandomInClosedRange {
5254
}

0 commit comments

Comments
 (0)