Skip to content

Commit 089ea92

Browse files
committed
[stdlib] Fix warnings in Collections validation test
1 parent 95de0e4 commit 089ea92

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

validation-test/stdlib/CollectionType.swift.gyb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct MinimalCollectionWith${Implementation}Filter<Element>
112112
}
113113

114114
func filter(
115-
@noescape _ transform: (Element) throws -> Bool
115+
_ transform: @noescape (Element) throws -> Bool
116116
) rethrows -> [Element] {
117117
MinimalCollectionWithCustomFilter.timesFilterWasCalled += 1
118118
return try _data.filter(transform)
@@ -126,7 +126,7 @@ struct MinimalCollectionWith${Implementation}Filter<Element>
126126

127127
func callStaticCollectionFilter(
128128
_ sequence: MinimalCollectionWithDefaultFilter<OpaqueValue<Int>>,
129-
@noescape includeElement: (OpaqueValue<Int>) -> Bool
129+
includeElement: @noescape (OpaqueValue<Int>) -> Bool
130130
) -> [OpaqueValue<Int>] {
131131
var result = sequence.filter(includeElement)
132132
expectType([OpaqueValue<Int>].self, &result)
@@ -135,7 +135,7 @@ func callStaticCollectionFilter(
135135

136136
func callStaticCollectionFilter(
137137
_ sequence: MinimalCollectionWithCustomFilter<OpaqueValue<Int>>,
138-
@noescape includeElement: (OpaqueValue<Int>) -> Bool
138+
includeElement: @noescape (OpaqueValue<Int>) -> Bool
139139
) -> [OpaqueValue<Int>] {
140140
var result = sequence.filter(includeElement)
141141
expectType([OpaqueValue<Int>].self, &result)
@@ -144,7 +144,7 @@ func callStaticCollectionFilter(
144144

145145
func callGenericCollectionFilter<S : Collection>(
146146
_ sequence: S,
147-
@noescape includeElement: (S.Iterator.Element) -> Bool
147+
includeElement: @noescape (S.Iterator.Element) -> Bool
148148
) -> [S.Iterator.Element] {
149149
var result = sequence.filter(includeElement)
150150
expectType(Array<S.Iterator.Element>.self, &result)
@@ -249,7 +249,7 @@ struct MinimalCollectionWith${Implementation}Map<Element>
249249
}
250250

251251
func map<T>(
252-
@noescape _ transform: (Element) throws -> T
252+
_ transform: @noescape (Element) throws -> T
253253
) rethrows -> [T] {
254254
MinimalCollectionWithCustomMap.timesMapWasCalled += 1
255255
return try _data.map(transform)
@@ -263,7 +263,7 @@ struct MinimalCollectionWith${Implementation}Map<Element>
263263

264264
func callStaticCollectionMap<T>(
265265
_ collection: MinimalCollectionWithDefaultMap<OpaqueValue<Int>>,
266-
@noescape transform: (OpaqueValue<Int>) -> T
266+
transform: @noescape (OpaqueValue<Int>) -> T
267267
) -> [T] {
268268
var result = collection.map(transform)
269269
expectType([T].self, &result)
@@ -272,7 +272,7 @@ func callStaticCollectionMap<T>(
272272

273273
func callStaticCollectionMap<T>(
274274
_ collection: MinimalCollectionWithCustomMap<OpaqueValue<Int>>,
275-
@noescape transform: (OpaqueValue<Int>) -> T
275+
transform: @noescape (OpaqueValue<Int>) -> T
276276
) -> [T] {
277277
var result = collection.map(transform)
278278
expectType([T].self, &result)
@@ -281,7 +281,7 @@ func callStaticCollectionMap<T>(
281281

282282
func callGenericCollectionMap<C : Collection, T>(
283283
_ collection: C,
284-
@noescape transform: (C.Iterator.Element) -> T
284+
transform: @noescape (C.Iterator.Element) -> T
285285
) -> [T] {
286286
var result = collection.map(transform)
287287
expectType([T].self, &result)
@@ -750,7 +750,7 @@ CollectionTypeTests.test("index(of:)/ContinueSearch") {
750750

751751
CollectionTypeTests.test("Collection/split/dispatch") {
752752
var tester = CollectionLog.dispatchTester([OpaqueValue(1)])
753-
tester.split { $0.value == 1 }
753+
_ = tester.split { $0.value == 1 }
754754
expectCustomizable(tester, tester.log.split)
755755
}
756756

@@ -760,7 +760,7 @@ CollectionTypeTests.test("Collection/split/dispatch") {
760760

761761
CollectionTypeTests.test("Collection/prefix(through:)/dispatch") {
762762
var tester = CollectionLog.dispatchTester([1, 2, 3].map(OpaqueValue.init))
763-
tester.prefix(through: 1)
763+
_ = tester.prefix(through: 1)
764764
expectCustomizable(tester, tester.log.prefixThrough)
765765
}
766766

@@ -770,7 +770,7 @@ CollectionTypeTests.test("Collection/prefix(through:)/dispatch") {
770770

771771
CollectionTypeTests.test("Collection/prefix(upTo:)/dispatch") {
772772
var tester = CollectionLog.dispatchTester([OpaqueValue(1)])
773-
tester.prefix(upTo: 1)
773+
_ = tester.prefix(upTo: 1)
774774
expectCustomizable(tester, tester.log.prefixUpTo)
775775
}
776776

@@ -780,7 +780,7 @@ CollectionTypeTests.test("Collection/prefix(upTo:)/dispatch") {
780780

781781
CollectionTypeTests.test("Collection/suffix(from:)/dispatch") {
782782
var tester = CollectionLog.dispatchTester([1, 2, 3].map(OpaqueValue.init))
783-
tester.suffix(from: 1)
783+
_ = tester.suffix(from: 1)
784784
expectCustomizable(tester, tester.log.suffixFrom)
785785
}
786786

0 commit comments

Comments
 (0)