Skip to content

Commit b74d61c

Browse files
authored
Merge pull request #39 from apple/master
[pull] swiftwasm from apple:master
2 parents 30be570 + 37e267f commit b74d61c

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,6 @@ public func checkOneLevelOfRandomAccessCollection<
906906
//===------------------------------------------------------------------===//
907907

908908
let succ = { collection.index(after: $0) }
909-
let pred = { collection.index(before: $0) }
910909
// Advances up to 1 positions without passing endIndex. Don't use
911910
// advanced(by: n) to do this because it's under test here.
912911
let next = { $0 == collection.endIndex ? $0 : succ($0) }
@@ -924,7 +923,6 @@ public func checkOneLevelOfRandomAccessCollection<
924923
let count: Distance = collection.count
925924
let offset0 = min(5, count)
926925
let offset1 = min(10, count)
927-
let offset2 = min(15, count)
928926

929927
let distanceCandidates: [Distance] = [
930928
-11, -7, -5, -3, -2, -1, 0, 1, 2, 3, 5, 7, 11]
@@ -1676,7 +1674,6 @@ public func checkOneLevelOfRandomAccessCollection<
16761674
//===------------------------------------------------------------------===//
16771675

16781676
let succ = { collection.index(after: $0) }
1679-
let pred = { collection.index(before: $0) }
16801677
// Advances up to 1 positions without passing endIndex. Don't use
16811678
// advanced(by: n) to do this because it's under test here.
16821679
let next = { $0 == collection.endIndex ? $0 : succ($0) }
@@ -1694,7 +1691,6 @@ public func checkOneLevelOfRandomAccessCollection<
16941691
let count: Distance = collection.count
16951692
let offset0 = min(5, count)
16961693
let offset1 = min(10, count)
1697-
let offset2 = min(15, count)
16981694

16991695
let distanceCandidates: [Distance] = [
17001696
-11, -7, -5, -3, -2, -1, 0, 1, 2, 3, 5, 7, 11]
@@ -1871,7 +1867,7 @@ public func checkRangeReplaceable<C, N>(
18711867
let source = Array<A.Element>(makeCollection())
18721868

18731869
for (ix, i) in source.indices.enumerated() {
1874-
for (jx_, j) in (i..<source.endIndex).enumerated() {
1870+
for (jx_, _) in (i..<source.endIndex).enumerated() {
18751871
let jx = jx_ + ix
18761872

18771873
let oldCount = jx - ix

stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ self.test("\(testNamePrefix).subscript(_: Range)/Set/semantics") {
274274

275275
do {
276276
// Call setter implicitly through an inout mutation.
277-
var c = makeWrappedCollection(test.collection)
277+
let c = makeWrappedCollection(test.collection)
278278

279279
var s = c[test.bounds(in: c)]
280280
_mapInPlace(&s) {
@@ -520,7 +520,7 @@ self.test("\(testNamePrefix).sorted/DispatchesThrough_withUnsafeMutableBufferPoi
520520
}
521521
let c = makeWrappedCollectionWithComparableElement(elements)
522522

523-
var lc = LoggingMutableCollection(wrapping: c)
523+
let lc = LoggingMutableCollection(wrapping: c)
524524

525525
let result = lc.sorted()
526526
let extractedResult = result.map(extractValueFromComparable)
@@ -639,7 +639,7 @@ self.test("\(testNamePrefix).sorted/DispatchesThrough_withUnsafeMutableBufferPoi
639639
}
640640
let c = makeWrappedCollection(elements)
641641

642-
var lc = LoggingMutableCollection(wrapping: c)
642+
let lc = LoggingMutableCollection(wrapping: c)
643643

644644
let result = lc.sorted { extractValue($0).value < extractValue($1).value }
645645
let extractedResult = result.map(extractValue)

0 commit comments

Comments
 (0)