Browse Source

Slightly more cleanup.

Daniel Alm 8 years ago
parent
commit
9ef8be6d65
2 changed files with 7 additions and 7 deletions
  1. 2 4
      Sources/gRPC/Call.swift
  2. 5 3
      Sources/gRPC/Handler.swift

+ 2 - 4
Sources/gRPC/Call.swift

@@ -210,8 +210,7 @@ public class Call {
   public func start(_ style: CallStyle,
   public func start(_ style: CallStyle,
                     metadata: Metadata,
                     metadata: Metadata,
                     message: Data? = nil,
                     message: Data? = nil,
-                    completion: @escaping (CallResult) -> Void)
-    throws {
+                    completion: @escaping (CallResult) -> Void) throws {
     var operations: [Operation] = []
     var operations: [Operation] = []
     switch style {
     switch style {
     case .unary:
     case .unary:
@@ -267,8 +266,7 @@ public class Call {
   }
   }
   
   
   /// helper for sending queued messages
   /// helper for sending queued messages
-  private func sendWithoutBlocking(data: Data, errorHandler: @escaping (Error) -> Void)
-    throws {
+  private func sendWithoutBlocking(data: Data, errorHandler: @escaping (Error) -> Void) throws {
     try perform(OperationGroup(call: self,
     try perform(OperationGroup(call: self,
                                operations: [.sendMessage(ByteBuffer(data: data))]) { operationGroup in
                                operations: [.sendMessage(ByteBuffer(data: data))]) { operationGroup in
         if operationGroup.success {
         if operationGroup.success {

+ 5 - 3
Sources/gRPC/Handler.swift

@@ -233,9 +233,11 @@ public class Handler {
                          trailingMetadata: Metadata,
                          trailingMetadata: Metadata,
                          completion: @escaping (() -> Void)) throws {
                          completion: @escaping (() -> Void)) throws {
     let operations = OperationGroup(call: call,
     let operations = OperationGroup(call: call,
-                                    operations: [.sendStatusFromServer(statusCode,
-                                                                       statusMessage,
-                                                                       trailingMetadata)]) { operationGroup in
+                                    operations: [
+                                      .sendStatusFromServer(statusCode,
+                                                            statusMessage,
+                                                            trailingMetadata)
+    ]) { operationGroup in
       if operationGroup.success {
       if operationGroup.success {
         completion()
         completion()
       }
       }