Skip to content

Commit 55b08ec

Browse files
authored
Add if !os(WASI) for SwiftWasm (#53)
1 parent d81cd16 commit 55b08ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/CustomDump/Conformances/Foundation.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ extension Data: CustomDumpStringConvertible {
4343
}()
4444
}
4545

46+
#if !os(WASI)
4647
extension Date: CustomDumpStringConvertible {
4748
public var customDumpDescription: String {
4849
"Date(\(Self.formatter.string(from: self)))"
@@ -55,6 +56,7 @@ extension Date: CustomDumpStringConvertible {
5556
return formatter
5657
}()
5758
}
59+
#endif
5860

5961
extension Decimal: CustomDumpStringConvertible {
6062
public var customDumpDescription: String {
@@ -167,11 +169,13 @@ extension NSMeasurement: CustomDumpRepresentable {
167169
}
168170
}
169171

172+
#if !os(WASI)
170173
extension NSNotification: CustomDumpRepresentable {
171174
public var customDumpValue: Any {
172175
self as Notification
173176
}
174177
}
178+
#endif
175179

176180
extension NSOrderedSet: CustomDumpReflectable {
177181
public var customDumpMirror: Mirror {
@@ -230,11 +234,13 @@ extension NSURLQueryItem: CustomDumpRepresentable {
230234
}
231235
}
232236

237+
#if !os(WASI)
233238
extension NSURLRequest: CustomDumpRepresentable {
234239
public var customDumpValue: Any {
235240
self as URLRequest
236241
}
237242
}
243+
#endif
238244

239245
extension NSUUID: CustomDumpRepresentable {
240246
public var customDumpValue: Any {
@@ -269,6 +275,7 @@ extension URL: CustomDumpStringConvertible {
269275
}
270276
}
271277

278+
#if !os(WASI)
272279
extension URLRequest.NetworkServiceType: CustomDumpStringConvertible {
273280
public var customDumpDescription: String {
274281
switch self { #if canImport(FoundationNetworking)
@@ -309,6 +316,7 @@ extension URLRequest.NetworkServiceType: CustomDumpStringConvertible {
309316
}
310317
}
311318
}
319+
#endif
312320

313321
extension UUID: CustomDumpStringConvertible {
314322
public var customDumpDescription: String {

0 commit comments

Comments
 (0)