Skip to content

Commit 3cadfd2

Browse files
committed
remove some foundations
1 parent 467deff commit 3cadfd2

File tree

7 files changed

+6
-8
lines changed

7 files changed

+6
-8
lines changed

Sources/CustomDump/Conformances/Foundation.swift

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if canImport(Foundation)
12
import Foundation
23

34
#if canImport(FoundationNetworking)
@@ -321,3 +322,4 @@ extension UUID: CustomDumpStringConvertible {
321322
"UUID(\(self.uuidString))"
322323
}
323324
}
325+
#endif

Sources/CustomDump/Conformances/KeyPath.swift

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import Foundation
2-
31
extension AnyKeyPath: CustomDumpStringConvertible {
42
public var customDumpDescription: String {
53
if #available(macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4, *) {

Sources/CustomDump/Conformances/Swift.swift

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import Foundation
2-
31
extension Character: CustomDumpRepresentable {
42
public var customDumpValue: Any {
53
String(self)

Sources/CustomDump/Internal/String.swift

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import Foundation
2-
31
extension String {
42
init?(stringProtocol value: Any) {
53
guard let value = value as? any StringProtocol else { return nil }
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
#if canImport(Foundation)
12
import Foundation
3+
#endif
24

35
public protocol _UnorderedCollection {}
6+
#if canImport(Foundation)
47
extension Dictionary: _UnorderedCollection {}
58
extension NSDictionary: _UnorderedCollection {}
69
extension NSSet: _UnorderedCollection {}
10+
#endif
711
extension Set: _UnorderedCollection {}

Tests/CustomDumpTests/Conformances/FoundationTests.swift

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import CustomDump
2-
import Foundation
32
import XCTest
43

54
#if canImport(FoundationNetworking)

Tests/CustomDumpTests/ExpectNoDifferenceTests.swift

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import CustomDump
2-
import Foundation
32
import XCTest
43

54
#if canImport(Testing)

0 commit comments

Comments
 (0)