Skip to content

Commit 85796cb

Browse files
authored
Use FoundationEssentials where possible (#17)
Motivation: FoundationEssentials only includes ... the essentials. We should use it where available. Modifications: - Replace Foundation imports with FoundationEssentials import Result: Smaller dependency set
1 parent d83f112 commit 85796cb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Sources/GRPCInteropTests/InteroperabilityTestCases.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
internal import GRPCCore
1818
private import SwiftProtobuf
1919

20+
#if canImport(FoundationEssentials)
21+
private import struct FoundationEssentials.Data
22+
#else
2023
private import struct Foundation.Data
24+
#endif
2125

2226
/// This test verifies that implementations support zero-size messages. Ideally, client
2327
/// implementations would verify that the request and response were zero bytes serialized, but

Sources/GRPCInteropTests/TestService.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
private import Foundation
1817
public import GRPCCore
1918
private import SwiftProtobuf
2019

20+
#if canImport(FoundationEssentials)
21+
private import struct FoundationEssentials.Data
22+
#else
23+
private import struct Foundation.Data
24+
#endif
25+
2126
public struct TestService: Grpc_Testing_TestService.ServiceProtocol {
2227
public init() {}
2328

0 commit comments

Comments
 (0)