Skip to content

Commit 1a4645b

Browse files
committed
temporarily disable Span and MutableSpan for Windows
The current Windows nightly is too old to be able to compile the expected syntax.
1 parent 759820e commit 1a4645b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,6 +2203,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22032203
return try _representation.withUnsafeBytes(body)
22042204
}
22052205

2206+
#if !os(Windows)
22062207
@available(FoundationSpan 6.2, *)
22072208
public var bytes: RawSpan {
22082209
@lifetime(borrow self)
@@ -2298,6 +2299,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22982299
#endif
22992300
}
23002301
}
2302+
#endif // !os(Windows)
23012303

23022304
@_alwaysEmitIntoClient
23032305
public func withContiguousStorageIfAvailable<ResultType>(_ body: (_ buffer: UnsafeBufferPointer<UInt8>) throws -> ResultType) rethrows -> ResultType? {

Tests/FoundationEssentialsTests/DataTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,7 @@ class DataTests : XCTestCase {
16341634
// source.advanced(by: 5)
16351635
}
16361636

1637+
#if !os(Windows)
16371638
func test_InlineDataSpan() throws {
16381639
guard #available(FoundationSpan 6.2, *) else { throw XCTSkip("Span not available") }
16391640

@@ -1777,6 +1778,7 @@ class DataTests : XCTestCase {
17771778
XCTAssertEqual(source[i], 0)
17781779
XCTAssertEqual(source[i+1], .max)
17791780
}
1781+
#endif // !os(Windows)
17801782

17811783
#if false // FIXME: XCTest doesn't support crash tests yet rdar://20195010&22387653
17821784
func test_bounding_failure_subdata() {

0 commit comments

Comments
 (0)