Przeglądaj źródła

Fix building for 32-bit architectures (#535)

Serg Krivoblotsky 6 lat temu
rodzic
commit
74d020e86f
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Sources/GRPC/GRPCTimeout.swift

+ 2 - 2
Sources/GRPC/GRPCTimeout.swift

@@ -46,7 +46,7 @@ public struct GRPCTimeout: CustomStringConvertible, Equatable {
 
     // See "Timeout" in https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests
     let description = "\(amount)\(unit.rawValue)"
-    let nanoseconds = Int64(amount) * Int64(unit.asNanoseconds)
+    let nanoseconds = Int64(amount) * unit.asNanoseconds
 
     return GRPCTimeout(nanoseconds: nanoseconds, description: description)
   }
@@ -133,7 +133,7 @@ private enum GRPCTimeoutUnit: String {
   case microseconds = "u"
   case nanoseconds = "n"
 
-  internal var asNanoseconds: Int {
+  internal var asNanoseconds: Int64 {
     switch self {
     case .hours:
       return 60 * 60 * 1000 * 1000 * 1000