mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[stdlib] Remove more unneeded numericCasts
This commit is contained in:
@@ -25,11 +25,11 @@ import ucrt
|
||||
extension Collection {
|
||||
internal func index(_nth n: Int) -> Index {
|
||||
precondition(n >= 0)
|
||||
return index(startIndex, offsetBy: numericCast(n))
|
||||
return index(startIndex, offsetBy: n)
|
||||
}
|
||||
internal func index(_nthLast n: Int) -> Index {
|
||||
precondition(n >= 0)
|
||||
return index(endIndex, offsetBy: -numericCast(n))
|
||||
return index(endIndex, offsetBy: -n)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user