Skip to content

Commit 1527a7f

Browse files
authored
Add Sendable to Date, DateComponents, Data, and UUID
* Add Sendable to Date, DateComponents and Data * Make UUID Sendable
1 parent 9062587 commit 1527a7f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Darwin/Foundation-swiftoverlay/Date.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import CoreFoundation
1919

2020
A `Date` is independent of a particular calendar or time zone. To represent a `Date` to a user, you must interpret it in the context of a `Calendar`.
2121
*/
22-
public struct Date : ReferenceConvertible, Comparable, Equatable {
22+
public struct Date : ReferenceConvertible, Comparable, Equatable, Sendable {
2323
public typealias ReferenceType = NSDate
2424

2525
fileprivate var _time : TimeInterval

Darwin/Foundation-swiftoverlay/DateComponents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
When a new instance of `DateComponents` is created, the date components are set to `nil`.
2121
*/
22-
public struct DateComponents : ReferenceConvertible, Hashable, Equatable, _MutableBoxing {
22+
public struct DateComponents : ReferenceConvertible, Hashable, Equatable, @unchecked Sendable, _MutableBoxing {
2323
public typealias ReferenceType = NSDateComponents
2424

2525
internal var _handle: _MutableHandle<NSDateComponents>

Sources/Foundation/Data.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ internal class __NSSwiftData : NSData {
660660
}
661661

662662
@frozen
663-
public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessCollection, MutableCollection, RangeReplaceableCollection, MutableDataProtocol, ContiguousBytes {
663+
public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessCollection, MutableCollection, RangeReplaceableCollection, MutableDataProtocol, ContiguousBytes, @unchecked Sendable {
664664
public typealias ReferenceType = NSData
665665

666666
public typealias ReadingOptions = NSData.ReadingOptions

Sources/Foundation/UUID.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public typealias uuid_t = (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt
1616
public typealias uuid_string_t = (Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)
1717

1818
/// Represents UUID strings, which can be used to uniquely identify types, interfaces, and other items.
19-
public struct UUID : ReferenceConvertible, Hashable, Equatable, CustomStringConvertible {
19+
public struct UUID : ReferenceConvertible, Hashable, Equatable, CustomStringConvertible, Sendable {
2020
public typealias ReferenceType = NSUUID
2121

2222
public private(set) var uuid: uuid_t = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

0 commit comments

Comments
 (0)