2
0
Эх сурвалжийг харах

Remove implicit unwrapping optional (!) designation for most underlying objects

Tim Burks 9 жил өмнө
parent
commit
0494303891

+ 1 - 1
Packages/gRPC/Sources/ByteBuffer.swift

@@ -54,7 +54,7 @@ public class ByteBuffer {
   /// - Parameter data: the data to store in the buffer
   public init(data: Data) {
     data.withUnsafeBytes { (bytes) in
-      self.underlyingByteBuffer = cgrpc_byte_buffer_create_by_copying_data(bytes, data.count)
+      underlyingByteBuffer = cgrpc_byte_buffer_create_by_copying_data(bytes, data.count)
     }
   }
 

+ 1 - 1
Packages/gRPC/Sources/Call.swift

@@ -114,7 +114,7 @@ public typealias SendMessageCompletion = (CallError) -> Void
 public class Call {
 
   /// Pointer to underlying C representation
-  private var underlyingCall : UnsafeMutableRawPointer!
+  private var underlyingCall : UnsafeMutableRawPointer
 
   /// Completion queue used for call
   private var completionQueue: CompletionQueue

+ 1 - 1
Packages/gRPC/Sources/Client.swift

@@ -39,7 +39,7 @@ import Foundation
 public class Client {
 
   /// Pointer to underlying C representation
-  private var underlyingClient: UnsafeMutableRawPointer!
+  private var underlyingClient: UnsafeMutableRawPointer
 
   /// Completion queue for client call operations
   private var completionQueue: CompletionQueue

+ 1 - 1
Packages/gRPC/Sources/CompletionQueue.swift

@@ -74,7 +74,7 @@ internal class CompletionQueue {
   internal var name : String!
 
   /// Pointer to underlying C representation
-  private var underlyingCompletionQueue : UnsafeMutableRawPointer!
+  private var underlyingCompletionQueue : UnsafeMutableRawPointer
 
   /// Operation groups that are awaiting completion, keyed by tag
   internal var operationGroups : [Int64 : OperationGroup] = [:]

+ 2 - 2
Packages/gRPC/Sources/Handler.swift

@@ -38,7 +38,7 @@ import Foundation // for String.Encoding
 /// A gRPC request handler
 public class Handler {
   /// Pointer to underlying C representation
-  private var underlyingHandler: UnsafeMutableRawPointer!
+  private var underlyingHandler: UnsafeMutableRawPointer
 
   /// Completion queue for handler response operations
   var completionQueue: CompletionQueue
@@ -74,7 +74,7 @@ public class Handler {
   /// Initializes a Handler
   ///
   /// - Parameter h: the underlying C representation
-  init(underlyingHandler:UnsafeMutableRawPointer!) {
+  init(underlyingHandler:UnsafeMutableRawPointer) {
     self.underlyingHandler = underlyingHandler;
     self.requestMetadata = Metadata()
     self.completionQueue = CompletionQueue(

+ 1 - 1
Packages/gRPC/Sources/Mutex.swift

@@ -39,7 +39,7 @@
 public class Mutex {
 
   /// Pointer to underlying C representation
-  private var underlyingMutex: UnsafeMutableRawPointer!
+  private var underlyingMutex: UnsafeMutableRawPointer
 
   /// Initializes a Mutex
   public init() {

+ 1 - 1
Packages/gRPC/Sources/OperationGroup.swift

@@ -59,7 +59,7 @@ class OperationGroup {
   var operationsArray : [Operation]?
 
   /// Pointer to underlying C representation
-  var underlyingOperations : UnsafeMutableRawPointer!
+  var underlyingOperations : UnsafeMutableRawPointer
 
   /// Completion handler that is called when the group completes
   var completion : ((Bool) -> Void)

+ 1 - 1
Packages/gRPC/Sources/Server.swift

@@ -39,7 +39,7 @@ import Foundation
 public class Server {
 
   /// Pointer to underlying C representation
-  private var underlyingServer: UnsafeMutableRawPointer!
+  private var underlyingServer: UnsafeMutableRawPointer
 
   /// Completion queue used for server operations
   var completionQueue: CompletionQueue