Skip to content

Commit 66b6aff

Browse files
committed
Revert tuple labels.
1 parent 5527e1d commit 66b6aff

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Sources/Algorithms/Cycle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ extension FiniteCycle: Collection {
110110

111111
@inlinable
112112
public subscript(_ index: Index) -> Element {
113-
product[index.productIndex].element2
113+
product[index.productIndex].1
114114
}
115115

116116
@inlinable

Sources/Algorithms/Product.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ extension Product2: Sequence {
4444
}
4545

4646
@inlinable
47-
public mutating func next() -> (element1: Base1.Element,
48-
element2: Base2.Element)? {
47+
public mutating func next() -> (Base1.Element,
48+
Base2.Element)? {
4949
// This is the initial state, where i1.next() has never
5050
// been called, or the final state, where i1.next() has
5151
// already returned nil.
@@ -58,7 +58,7 @@ extension Product2: Sequence {
5858
// Get the next element from the second sequence, if not
5959
// at end.
6060
if let element2 = i2.next() {
61-
return (element1: element1!, element2: element2)
61+
return (element1!, element2)
6262
}
6363

6464
// We've reached the end of the second sequence, so:
@@ -71,7 +71,7 @@ extension Product2: Sequence {
7171

7272
i2 = base2.makeIterator()
7373
if let element2 = i2.next() {
74-
return (element1: element1, element2: element2)
74+
return (element1, element2)
7575
} else {
7676
return nil
7777
}
@@ -122,9 +122,9 @@ extension Product2: Collection where Base1: Collection {
122122
}
123123

124124
@inlinable
125-
public subscript(position: Index) -> (element1: Base1.Element,
126-
element2: Base2.Element) {
127-
(element1: base1[position.i1], element2: base2[position.i2])
125+
public subscript(position: Index) -> (Base1.Element,
126+
Base2.Element) {
127+
(base1[position.i1], base2[position.i2])
128128
}
129129

130130
/// Forms an index from a pair of base indices, normalizing

0 commit comments

Comments
 (0)