Skip to content

Commit 80a7aef

Browse files
committed
[stdlib] use the Index typealias when appropriate
1 parent 1f5a2ba commit 80a7aef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stdlib/public/core/Span/Span.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,9 @@ extension Span where Element: ~Copyable {
544544
/// - Complexity: O(1)
545545
@_alwaysEmitIntoClient
546546
@lifetime(self)
547-
public func _extracting(_ bounds: some RangeExpression<Int>) -> Self {
547+
public func _extracting(
548+
_ bounds: some RangeExpression<Index>
549+
) -> Self {
548550
_extracting(bounds.relative(to: indices))
549551
}
550552

@@ -567,7 +569,7 @@ extension Span where Element: ~Copyable {
567569
@_alwaysEmitIntoClient
568570
@lifetime(self)
569571
public func _extracting(
570-
unchecked bounds: some RangeExpression<Int>
572+
unchecked bounds: some RangeExpression<Index>
571573
) -> Self {
572574
_extracting(unchecked: bounds.relative(to: indices))
573575
}

0 commit comments

Comments
 (0)