Skip to content

Commit 8b4fe6b

Browse files
committed
Eliminate some unnecessary shadowing generic parameters
1 parent 878066b commit 8b4fe6b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

stdlib/private/StdlibUnittest/MinimalTypes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public struct GenericMinimalHashableValue<Wrapped> : Equatable, Hashable {
242242
self.identity = identity
243243
}
244244

245-
public static func == <Wrapped>(
245+
public static func ==(
246246
lhs: GenericMinimalHashableValue<Wrapped>,
247247
rhs: GenericMinimalHashableValue<Wrapped>
248248
) -> Bool {
@@ -298,7 +298,7 @@ public class GenericMinimalHashableClass<Wrapped> : Equatable, Hashable {
298298
self.identity = identity
299299
}
300300

301-
public static func == <Wrapped>(
301+
public static func ==(
302302
lhs: GenericMinimalHashableClass<Wrapped>,
303303
rhs: GenericMinimalHashableClass<Wrapped>
304304
) -> Bool {

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3479,11 +3479,11 @@ struct Pair<T : Comparable> : Comparable {
34793479
var first: T
34803480
var second: T
34813481

3482-
static func == <T>(lhs: Pair<T>, rhs: Pair<T>) -> Bool {
3482+
static func ==(lhs: Pair<T>, rhs: Pair<T>) -> Bool {
34833483
return lhs.first == rhs.first && lhs.second == rhs.second
34843484
}
34853485

3486-
static func < <T>(lhs: Pair<T>, rhs: Pair<T>) -> Bool {
3486+
static func <(lhs: Pair<T>, rhs: Pair<T>) -> Bool {
34873487
return [lhs.first, lhs.second].lexicographicallyPrecedes(
34883488
[rhs.first, rhs.second])
34893489
}

stdlib/public/core/Diffing.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ private func _myers<C,D>(
349349
* necessary) is significantly less than the worst-case n² memory use of the
350350
* descent algorithm.
351351
*/
352-
func _withContiguousStorage<C: Collection, R>(
353-
for values: C,
354-
_ body: (UnsafeBufferPointer<C.Element>) throws -> R
352+
func _withContiguousStorage<Col: Collection, R>(
353+
for values: Col,
354+
_ body: (UnsafeBufferPointer<Col.Element>) throws -> R
355355
) rethrows -> R {
356356
if let result = try values.withContiguousStorageIfAvailable(body) { return result }
357357
let array = ContiguousArray(values)

0 commit comments

Comments
 (0)