Clean up gRPC.swift
MODIFY
Sources/SwiftGRPC/Core/gRPC.swift
Sources/SwiftGRPC/Core/gRPC.swift
#if SWIFT_PACKAGE
import CgRPC
#endif
-import Foundation // for String.Encoding
public final class gRPC {
private init() { } // Static members only.
@@ -32,17 +31,13 @@ public final class gRPC {
}
/// Returns version of underlying gRPC library
- ///
- /// Returns: gRPC version string
public static var version: String {
// These two should always be valid UTF-8 strings, so we can forcibly unwrap them.
- return String(cString: grpc_version_string(), encoding: String.Encoding.utf8)!
+ return String(cString: grpc_version_string(), encoding: .utf8)!
}
/// Returns name associated with gRPC version
- ///
- /// Returns: gRPC version name
public static var gStandsFor: String {
- return String(cString: grpc_g_stands_for(), encoding: String.Encoding.utf8)!
+ return String(cString: grpc_g_stands_for(), encoding: .utf8)!
}
}

Clean up gRPC.swift (#386)