Skip to content

Commit 4363f61

Browse files
committed
Mark ClosedRange->Range conversion inlinable
1 parent 26457bf commit 4363f61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/public/core/ClosedRange.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ extension ClosedRange where Bound: Strideable, Bound.Stride : SignedInteger {
433433
/// An equivalent range must be representable as a closed range.
434434
/// For example, passing an empty range as `other` triggers a runtime error,
435435
/// because an empty range cannot be represented by a closed range instance.
436+
@inlinable
436437
public init(_ other: Range<Bound>) {
437438
_precondition(!other.isEmpty, "Can't form an empty closed range")
438439
let upperBound = other.upperBound.advanced(by: -1)

0 commit comments

Comments
 (0)