Skip to content

Commit 42b9a20

Browse files
committed
Merge pull request #268 from mxcl/warning--
--warning (@NoEscape moved to parameter)
2 parents 3a139d9 + a1b6f6c commit 42b9a20

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Sources/POSIX/mkdtemp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import func libc.rmdir
1818
- Note: We only call rmdir() on the directory once done, it is up to
1919
you to recursively delete the contents and thus ensure the rmdir succeeds
2020
*/
21-
public func mkdtemp<T>(_ template: String, prefix: String! = nil, @noescape body: (String) throws -> T) rethrows -> T {
21+
public func mkdtemp<T>(_ template: String, prefix: String! = nil, body: @noescape(String) throws -> T) rethrows -> T {
2222
var prefix = prefix
2323
if prefix == nil { prefix = getenv("TMPDIR") ?? "/tmp/" }
2424
if !prefix.hasSuffix("/") {

Tests/Functional/Utilities.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import class Foundation.NSBundle
2121
#endif
2222

2323

24-
func fixture(name fixtureName: String, tags: [String] = [], file: StaticString = #file, line: UInt = #line, @noescape body: (String) throws -> Void) {
24+
func fixture(name fixtureName: String, tags: [String] = [], file: StaticString = #file, line: UInt = #line, body: @noescape(String) throws -> Void) {
2525

2626
func gsub(_ input: String) -> String {
2727
return input.characters.split(separator: "/").map(String.init).joined(separator: "_")
@@ -155,7 +155,7 @@ func executeSwiftBuild(_ chdir: String, configuration: Configuration = .Debug, p
155155
}
156156
}
157157

158-
func mktmpdir(_ file: StaticString = #file, line: UInt = #line, @noescape body: (String) throws -> Void) {
158+
func mktmpdir(_ file: StaticString = #file, line: UInt = #line, body: @noescape(String) throws -> Void) {
159159
do {
160160
try POSIX.mkdtemp("spm-tests") { dir in
161161
defer { _ = try? rmtree(dir) }

Tests/Functional/ValidLayoutTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class ValidLayoutsTestCase: XCTestCase {
9999
//MARK: Utility
100100

101101
extension ValidLayoutsTestCase {
102-
func runLayoutFixture(name: String, line: UInt = #line, @noescape body: (String) throws -> Void) {
102+
func runLayoutFixture(name: String, line: UInt = #line, body: @noescape(String) throws -> Void) {
103103
let name = "ValidLayouts/\(name)"
104104

105105
// 1. Rooted layout

Tests/PackageDescription/VersionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import XCTest
1515
class VersionTests: XCTestCase {
1616

1717
func testEquality() {
18-
func test(@autoclosure _ v: () -> Version) {
18+
func test( _ v: @autoclosure() -> Version) {
1919
XCTAssertEqual(v(), v())
2020
}
2121

Tests/Xcodeproj/GenerateXcodeprojTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import XCTest
1616

1717

1818
// copy pasta
19-
func mktmpdir(_ file: StaticString = #file, line: UInt = #line, @noescape body: (String) throws -> Void) {
19+
func mktmpdir(_ file: StaticString = #file, line: UInt = #line, body: @noescape(String) throws -> Void) {
2020
do {
2121
try POSIX.mkdtemp("spm-tests") { dir in
2222
defer { _ = try? rmtree(dir) }

0 commit comments

Comments
 (0)