mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Eradicate IndexDistance associated type (#12641)
* Eradicate IndexDistance associated type, replacing with Int everywhere * Consistently use Int for ExistentialCollection’s IndexDistance type. * Fix test for IndexDistance removal * Remove a handful of no-longer-needed explicit types * Add compatibility shims for non-Int index distances * Test compatibility shim * Move IndexDistance typealias into the Collection protocol
This commit is contained in:
@@ -1149,7 +1149,7 @@ func toIntRange<
|
||||
S : StringProtocol
|
||||
>(
|
||||
_ string: S, _ maybeRange: Range<String.Index>?
|
||||
) -> Range<Int>? where S.Index == String.Index, S.IndexDistance == Int {
|
||||
) -> Range<Int>? where S.Index == String.Index {
|
||||
guard let range = maybeRange else { return nil }
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user