THRIFT-5084: Multiplexed processor in Swift – explicit return statements
Client: swift
Patch: Alexander Edge
This closes #2028
diff --git a/lib/swift/Sources/TMultiplexedProcessor.swift b/lib/swift/Sources/TMultiplexedProcessor.swift
index 9841d3f..661d4a7 100644
--- a/lib/swift/Sources/TMultiplexedProcessor.swift
+++ b/lib/swift/Sources/TMultiplexedProcessor.swift
@@ -86,6 +86,6 @@
}
override func readMessageBegin() throws -> (String, TMessageType, Int32) {
- message
+ return message
}
}
diff --git a/lib/swift/Sources/TProtocolDecorator.swift b/lib/swift/Sources/TProtocolDecorator.swift
index 3f3b4a1..b1b1480 100644
--- a/lib/swift/Sources/TProtocolDecorator.swift
+++ b/lib/swift/Sources/TProtocolDecorator.swift
@@ -34,7 +34,7 @@
}
func readMessageBegin() throws -> (String, TMessageType, Int32) {
- try proto.readMessageBegin()
+ return try proto.readMessageBegin()
}
func readMessageEnd() throws {
@@ -42,7 +42,7 @@
}
func readStructBegin() throws -> String {
- try proto.readStructBegin()
+ return try proto.readStructBegin()
}
func readStructEnd() throws {
@@ -50,7 +50,7 @@
}
func readFieldBegin() throws -> (String, TType, Int32) {
- try proto.readFieldBegin()
+ return try proto.readFieldBegin()
}
func readFieldEnd() throws {
@@ -58,7 +58,7 @@
}
func readMapBegin() throws -> (TType, TType, Int32) {
- try proto.readMapBegin()
+ return try proto.readMapBegin()
}
func readMapEnd() throws {
@@ -66,7 +66,7 @@
}
func readSetBegin() throws -> (TType, Int32) {
- try proto.readSetBegin()
+ return try proto.readSetBegin()
}
func readSetEnd() throws {
@@ -74,7 +74,7 @@
}
func readListBegin() throws -> (TType, Int32) {
- try proto.readListBegin()
+ return try proto.readListBegin()
}
func readListEnd() throws {
@@ -82,35 +82,35 @@
}
func read() throws -> String {
- try proto.read()
+ return try proto.read()
}
func read() throws -> Bool {
- try proto.read()
+ return try proto.read()
}
func read() throws -> UInt8 {
- try proto.read()
+ return try proto.read()
}
func read() throws -> Int16 {
- try proto.read()
+ return try proto.read()
}
func read() throws -> Int32 {
- try proto.read()
+ return try proto.read()
}
func read() throws -> Int64 {
- try proto.read()
+ return try proto.read()
}
func read() throws -> Double {
- try proto.read()
+ return try proto.read()
}
func read() throws -> Data {
- try proto.read()
+ return try proto.read()
}
func writeMessageBegin(name: String, type messageType: TMessageType, sequenceID: Int32) throws {