mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Cleanup DefaultIndices, delete dead code (#13952)
* Remove a bunch of Default(Bidirectional|RandomAccess)Indices usage from stdlib and test * Remove some DefaultRandomAccessIndices and IndexDistance usage from Foundation * Remove no-longer-used internal type in Existentials.swift * Get rid of indicesForTraversal
This commit is contained in:
@@ -39,18 +39,6 @@ def protocolsForCollectionFeatures(traversal, mutable, rangeReplaceable): # noq
|
||||
protocols.append('RangeReplaceableCollection')
|
||||
return protocols
|
||||
|
||||
|
||||
def defaultIndicesForTraversal(traversal): # noqa (N802)
|
||||
if traversal == 'Forward':
|
||||
return 'DefaultIndices'
|
||||
elif traversal == 'Bidirectional':
|
||||
return 'DefaultBidirectionalIndices'
|
||||
elif traversal == 'RandomAccess':
|
||||
return 'DefaultRandomAccessIndices'
|
||||
else:
|
||||
raise ValueError("Unknown traversal %r" % traversal)
|
||||
|
||||
|
||||
def documentationNameForTraversal(traversal): # noqa (N802)
|
||||
if traversal == 'Forward':
|
||||
return 'collection'
|
||||
|
||||
Reference in New Issue
Block a user