From 8732b155979a31d9e5ae1a4a1d4d91a541b45f71 Mon Sep 17 00:00:00 2001 From: David Zarzycki Date: Mon, 27 Jan 2020 06:12:02 -0500 Subject: [PATCH] [Testing] Fix unused/read-only variable warnings --- .../StdlibCollectionUnittest/CheckCollectionInstance.swift | 6 +----- .../CheckMutableCollectionType.swift | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift b/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift index beeb60d36f6db..03626108de34c 100644 --- a/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift +++ b/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift @@ -906,7 +906,6 @@ public func checkOneLevelOfRandomAccessCollection< //===------------------------------------------------------------------===// let succ = { collection.index(after: $0) } - let pred = { collection.index(before: $0) } // Advances up to 1 positions without passing endIndex. Don't use // advanced(by: n) to do this because it's under test here. let next = { $0 == collection.endIndex ? $0 : succ($0) } @@ -924,7 +923,6 @@ public func checkOneLevelOfRandomAccessCollection< let count: Distance = collection.count let offset0 = min(5, count) let offset1 = min(10, count) - let offset2 = min(15, count) let distanceCandidates: [Distance] = [ -11, -7, -5, -3, -2, -1, 0, 1, 2, 3, 5, 7, 11] @@ -1676,7 +1674,6 @@ public func checkOneLevelOfRandomAccessCollection< //===------------------------------------------------------------------===// let succ = { collection.index(after: $0) } - let pred = { collection.index(before: $0) } // Advances up to 1 positions without passing endIndex. Don't use // advanced(by: n) to do this because it's under test here. let next = { $0 == collection.endIndex ? $0 : succ($0) } @@ -1694,7 +1691,6 @@ public func checkOneLevelOfRandomAccessCollection< let count: Distance = collection.count let offset0 = min(5, count) let offset1 = min(10, count) - let offset2 = min(15, count) let distanceCandidates: [Distance] = [ -11, -7, -5, -3, -2, -1, 0, 1, 2, 3, 5, 7, 11] @@ -1871,7 +1867,7 @@ public func checkRangeReplaceable( let source = Array(makeCollection()) for (ix, i) in source.indices.enumerated() { - for (jx_, j) in (i..