Fix warning

warning: generic parameter 'C' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
This commit is contained in:
Valeriy Van
2025-06-28 17:45:16 +03:00
parent edc7109989
commit 568364cd88

View File

@@ -187,9 +187,9 @@ fileprivate func myers<C,D>(
* necessary) is significantly less than the worst-case n² memory use of the
* descent algorithm.
*/
func _withContiguousStorage<C : Collection, R>(
for values: C,
_ body: (UnsafeBufferPointer<C.Element>) throws -> R
func _withContiguousStorage<Col : Collection, R>(
for values: Col,
_ body: (UnsafeBufferPointer<Col.Element>) throws -> R
) rethrows -> R {
if let result = try values.withContiguousStorageIfAvailable(body) { return result }
let array = ContiguousArray(values)