Skip to content

Commit 69dee3e

Browse files
committed
Fix Swift 5.0 compilation
... we care, don't you?
1 parent 89800b1 commit 69dee3e

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let package = Package(
1616
.package(url: "https://github.com/Macro-swift/MacroExpress.git",
1717
from: "0.6.0"),
1818
.package(url: "https://github.com/AlwaysRightInstitute/SwiftXmlRpc.git",
19-
from: "0.8.5")
19+
from: "0.8.6")
2020
],
2121

2222
targets: [

Sources/MacroXmlRpc/RouteKeeper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public extension RouteKeeper {
1818
( XmlRpc.Call ) throws -> XmlRpcValueRepresentable)
1919
-> Self
2020
{
21-
post(xmlrpc.synchronousCall(methodName, execute: execute))
21+
return post(xmlrpc.synchronousCall(methodName, execute: execute))
2222
}
2323
}

Sources/MacroXmlRpc/TypedRoutes.swift

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public extension RouteKeeper {
2525
where A1 : IntrospectibleXmlRpcValue,
2626
R : IntrospectibleXmlRpcValue
2727
{
28-
post(xmlrpc.synchronousCall(methodName) { call in
28+
return post(xmlrpc.synchronousCall(methodName) { call in
2929
guard call.parameters.count == 1,
3030
let a1 = A1(xmlRpcValue: call.parameters[0])
3131
else { throw XmlRpc.Fault(code: 400, reason: "Invalid parameters") }
@@ -42,7 +42,7 @@ public extension RouteKeeper {
4242
A2 : IntrospectibleXmlRpcValue,
4343
R : IntrospectibleXmlRpcValue
4444
{
45-
post(xmlrpc.synchronousCall(methodName) { call in
45+
return post(xmlrpc.synchronousCall(methodName) { call in
4646
guard call.parameters.count == 2,
4747
let a1 = A1(xmlRpcValue: call.parameters[0]),
4848
let a2 = A2(xmlRpcValue: call.parameters[1])
@@ -57,27 +57,27 @@ public extension RouteKeeper {
5757

5858
extension String: IntrospectibleXmlRpcValue {
5959
@inlinable
60-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .string }
60+
public static var xmlRpcValueType : XmlRpc.Value.ValueType { return .string }
6161
}
6262

6363
extension Int: IntrospectibleXmlRpcValue {
6464
@inlinable
65-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .int }
65+
public static var xmlRpcValueType : XmlRpc.Value.ValueType { return .int }
6666
}
6767

6868
extension Double: IntrospectibleXmlRpcValue {
6969
@inlinable
70-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .double }
70+
public static var xmlRpcValueType : XmlRpc.Value.ValueType { return .double }
7171
}
7272

7373
extension Bool: IntrospectibleXmlRpcValue {
7474
@inlinable
75-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .bool }
75+
public static var xmlRpcValueType : XmlRpc.Value.ValueType { return .bool }
7676
}
7777

7878
extension Collection where Element : IntrospectibleXmlRpcValue {
7979
@inlinable
80-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .array }
80+
public static var xmlRpcValueType : XmlRpc.Value.ValueType { return .array }
8181
}
8282

8383
extension Array : IntrospectibleXmlRpcValue
@@ -94,7 +94,9 @@ extension Dictionary : IntrospectibleXmlRpcValue
9494
Value : IntrospectibleXmlRpcValue
9595
{
9696
@inlinable
97-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .dictionary }
97+
public static var xmlRpcValueType : XmlRpc.Value.ValueType {
98+
return .dictionary
99+
}
98100
}
99101

100102
#if canImport(Foundation)
@@ -103,11 +105,15 @@ extension Dictionary : IntrospectibleXmlRpcValue
103105

104106
extension DateComponents: IntrospectibleXmlRpcValue {
105107
@inlinable
106-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .dateTime }
108+
public static var xmlRpcValueType : XmlRpc.Value.ValueType {
109+
return .dateTime
110+
}
107111
}
108112

109113
extension URL: IntrospectibleXmlRpcValue {
110114
@inlinable
111-
public static var xmlRpcValueType : XmlRpc.Value.ValueType { .string }
115+
public static var xmlRpcValueType : XmlRpc.Value.ValueType {
116+
return .string
117+
}
112118
}
113119
#endif // canImport(Foundation)

0 commit comments

Comments
 (0)