mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #82599 from valeriyvan/WarningDiffingMyers
Fix warning in benchmark: 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user