diff --git a/Sources/CustomDump/Conformances/Foundation.swift b/Sources/CustomDump/Conformances/Foundation.swift index 7b32936..d0a4b87 100644 --- a/Sources/CustomDump/Conformances/Foundation.swift +++ b/Sources/CustomDump/Conformances/Foundation.swift @@ -1,4 +1,3 @@ -#if canImport(Foundation) import Foundation #if canImport(FoundationNetworking) @@ -322,4 +321,3 @@ extension UUID: CustomDumpStringConvertible { "UUID(\(self.uuidString))" } } -#endif diff --git a/Sources/CustomDump/Conformances/KeyPath.swift b/Sources/CustomDump/Conformances/KeyPath.swift index cfbc636..3b5b557 100644 --- a/Sources/CustomDump/Conformances/KeyPath.swift +++ b/Sources/CustomDump/Conformances/KeyPath.swift @@ -1,3 +1,5 @@ +import Foundation + extension AnyKeyPath: CustomDumpStringConvertible { public var customDumpDescription: String { if #available(macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4, *) { diff --git a/Sources/CustomDump/Conformances/Swift.swift b/Sources/CustomDump/Conformances/Swift.swift index fb513e0..7e37f27 100644 --- a/Sources/CustomDump/Conformances/Swift.swift +++ b/Sources/CustomDump/Conformances/Swift.swift @@ -1,3 +1,5 @@ +import Foundation + extension Character: CustomDumpRepresentable { public var customDumpValue: Any { String(self) diff --git a/Sources/CustomDump/Internal/String.swift b/Sources/CustomDump/Internal/String.swift index e8ab293..e6434c1 100644 --- a/Sources/CustomDump/Internal/String.swift +++ b/Sources/CustomDump/Internal/String.swift @@ -1,3 +1,5 @@ +import Foundation + extension String { init?(stringProtocol value: Any) { guard let value = value as? any StringProtocol else { return nil } diff --git a/Sources/CustomDump/Internal/Unordered.swift b/Sources/CustomDump/Internal/Unordered.swift index b0a4212..f47cd61 100644 --- a/Sources/CustomDump/Internal/Unordered.swift +++ b/Sources/CustomDump/Internal/Unordered.swift @@ -1,11 +1,7 @@ -#if canImport(Foundation) import Foundation -#endif public protocol _UnorderedCollection {} -#if canImport(Foundation) extension Dictionary: _UnorderedCollection {} extension NSDictionary: _UnorderedCollection {} extension NSSet: _UnorderedCollection {} -#endif extension Set: _UnorderedCollection {} diff --git a/Tests/CustomDumpTests/Conformances/FoundationTests.swift b/Tests/CustomDumpTests/Conformances/FoundationTests.swift index fe0349d..2d10ab6 100644 --- a/Tests/CustomDumpTests/Conformances/FoundationTests.swift +++ b/Tests/CustomDumpTests/Conformances/FoundationTests.swift @@ -1,4 +1,5 @@ import CustomDump +import Foundation import XCTest #if canImport(FoundationNetworking) diff --git a/Tests/CustomDumpTests/ExpectNoDifferenceTests.swift b/Tests/CustomDumpTests/ExpectNoDifferenceTests.swift index ab10abb..8315fde 100644 --- a/Tests/CustomDumpTests/ExpectNoDifferenceTests.swift +++ b/Tests/CustomDumpTests/ExpectNoDifferenceTests.swift @@ -1,4 +1,5 @@ import CustomDump +import Foundation import XCTest #if canImport(Testing)