mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user