Skip to content

Commit 04b48a3

Browse files
committed
Add swift concurrency flags and update Get
1 parent 7d5dfce commit 04b48a3

File tree

5 files changed

+36
-18
lines changed

5 files changed

+36
-18
lines changed

Diff for: .swiftformat

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--swiftversion 5.7
2+
--binarygrouping none
3+
--decimalgrouping none
4+
--hexgrouping none
5+
--indent 2
6+
--octalgrouping none
7+
--semicolons never
8+
--wraparguments before-first
9+
--wrapcollections before-first
10+
--wrapparameters before-first
11+
--extensionacl on-declarations
12+
--maxwidth 100

Diff for: Package.resolved

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
{
2-
"object": {
3-
"pins": [
4-
{
5-
"package": "Get",
6-
"repositoryURL": "https://github.com/kean/Get",
7-
"state": {
8-
"branch": null,
9-
"revision": "7209fdb015686fd90918b2037cb2039206405bd3",
10-
"version": "2.1.5"
11-
}
2+
"pins" : [
3+
{
4+
"identity" : "get",
5+
"kind" : "remoteSourceControl",
6+
"location" : "https://github.com/kean/Get",
7+
"state" : {
8+
"revision" : "12830cc64f31789ae6f4352d2d51d03a25fc3741",
9+
"version" : "2.1.6"
1210
}
13-
]
14-
},
15-
"version": 1
11+
}
12+
],
13+
"version" : 2
1614
}

Diff for: Package.swift

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.5
1+
// swift-tools-version: 5.7
22

33
import PackageDescription
44

@@ -20,7 +20,15 @@ let package = Package(
2020
targets: [
2121
.target(
2222
name: "Functions",
23-
dependencies: ["Get"]
23+
dependencies: ["Get"],
24+
swiftSettings: [
25+
.unsafeFlags(
26+
[
27+
"-warn-concurrency",
28+
"-enable-actor-data-race-checks",
29+
]
30+
),
31+
]
2432
),
2533
.testTarget(
2634
name: "FunctionsTests",

Diff for: Sources/Functions/FunctionsClient.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Foundation
2-
import Get
1+
@preconcurrency import Foundation
2+
@preconcurrency import Get
33

44
public final class FunctionsClient {
55
let url: URL

Diff for: Sources/Functions/Types.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public struct FunctionInvokeOptions {
1616
let headers: [String: String]
1717
let body: Data?
1818

19-
public init<T: Encodable>(headers: [String: String] = [:], body: T) {
19+
public init(headers: [String: String] = [:], body: some Encodable) {
2020
var headers = headers
2121

2222
switch body {

0 commit comments

Comments
 (0)