THRIFT-4902: Swift 4 and 5 compatibility (#1827)
diff --git a/lib/swift/Sources/TStruct.swift b/lib/swift/Sources/TStruct.swift
index f172a32..38e51e7 100644
--- a/lib/swift/Sources/TStruct.swift
+++ b/lib/swift/Sources/TStruct.swift
@@ -29,10 +29,10 @@
}
public extension TStruct {
- public static var fieldIds: [String: (id: Int32, type: TType)] { return [:] }
- public static var thriftType: TType { return .struct }
+ static var fieldIds: [String: (id: Int32, type: TType)] { return [:] }
+ static var thriftType: TType { return .struct }
- public func write(to proto: TProtocol) throws {
+ func write(to proto: TProtocol) throws {
// Write struct name first
try proto.writeStructBegin(name: Self.structName)
@@ -45,7 +45,7 @@
try proto.writeStructEnd()
}
- public var hashValue: Int {
+ var hashValue: Int {
let prime = 31
var result = 1
self.forEach { _, value, _ in