Skip to content

Commit ef79f30

Browse files
author
Matt Zanchelli
committed
Simplify range expression by not using R.Bound since it’s always Int
1 parent 76aadc9 commit ef79f30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Algorithms/Combinations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public struct Combinations<Base: Collection> {
4545
internal init<R: RangeExpression>(
4646
_ base: Base, k: R
4747
) where R.Bound == Int {
48-
let range = k.relative(to: R.Bound.zero..<R.Bound.max)
48+
let range = 0 ..< .max
4949
self.base = base
5050
let upperBound = base.count + 1
5151
self.k = range.lowerBound < upperBound

0 commit comments

Comments
 (0)