[stdlib] Some minor cleanup (#18130)

* Remove case destructuring to _

* Remove some Iterator.Element

* Which idiot wrote this? Oh.

* Switch NibbleSort to just use default impls... shouldn't change perf
This commit is contained in:
Ben Cohen
2018-07-21 17:29:57 -07:00
committed by GitHub
parent 19104c0957
commit 4694310e51
34 changed files with 366 additions and 374 deletions

View File

@@ -26,14 +26,14 @@ protocol MyArrayBufferProtocol : MutableCollection, RandomAccessCollection {
mutating func myReplace<C>(
_ subRange: Range<Int>,
with newValues: C
) where C : Collection, C.Iterator.Element == Element
) where C : Collection, C.Element == Element
}
extension Array : MyArrayBufferProtocol {
mutating func myReplace<C>(
_ subRange: Range<Int>,
with newValues: C
) where C : Collection, C.Iterator.Element == Element {
) where C : Collection, C.Element == Element {
replaceSubrange(subRange, with: newValues)
}
}
@@ -42,7 +42,7 @@ func myArrayReplace<
B: MyArrayBufferProtocol,
C: Collection
>(_ target: inout B, _ subRange: Range<Int>, _ newValues: C)
where C.Iterator.Element == B.Element, B.Index == Int {
where C.Element == B.Element, B.Index == Int {
target.myReplace(subRange, with: newValues)
}