Skip to content

Commit eafffe1

Browse files
authored
Merge pull request #4874 from jumhyn-browser/cg-types-sendable
CG types are sendable
2 parents 7f62c8c + d5c78dc commit eafffe1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Sources/Foundation/CGFloat.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99

1010
@frozen
11-
public struct CGFloat {
11+
public struct CGFloat: Sendable {
1212
#if arch(i386) || arch(arm) || arch(wasm32)
1313
/// The native type used to store the CGFloat, which is Float on
1414
/// 32-bit architectures and Double on 64-bit architectures.

Sources/Foundation/NSGeometry.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88
//
99

10-
public struct CGPoint {
10+
public struct CGPoint: Sendable {
1111
public var x: CGFloat
1212
public var y: CGFloat
1313
public init() {
@@ -100,7 +100,7 @@ extension CGPoint : Codable {
100100
}
101101
}
102102

103-
public struct CGSize {
103+
public struct CGSize: Sendable {
104104
public var width: CGFloat
105105
public var height: CGFloat
106106
public init() {
@@ -193,7 +193,7 @@ extension CGSize : Codable {
193193
}
194194
}
195195

196-
public struct CGRect {
196+
public struct CGRect: Sendable {
197197
public var origin: CGPoint
198198
public var size: CGSize
199199
public init() {
@@ -501,15 +501,15 @@ extension CGRect: NSSpecialValueCoding {
501501
}
502502
}
503503

504-
public enum NSRectEdge : UInt {
504+
public enum NSRectEdge : UInt, Sendable {
505505

506506
case minX
507507
case minY
508508
case maxX
509509
case maxY
510510
}
511511

512-
public enum CGRectEdge : UInt32 {
512+
public enum CGRectEdge : UInt32, Sendable {
513513

514514
case minXEdge
515515
case minYEdge
@@ -529,7 +529,7 @@ extension NSRectEdge {
529529
}
530530

531531

532-
public struct NSEdgeInsets {
532+
public struct NSEdgeInsets: Sendable {
533533
public var top: CGFloat
534534
public var left: CGFloat
535535
public var bottom: CGFloat
@@ -604,7 +604,7 @@ extension NSEdgeInsets: NSSpecialValueCoding {
604604
}
605605
}
606606

607-
public struct AlignmentOptions : OptionSet {
607+
public struct AlignmentOptions : OptionSet, Sendable {
608608
public var rawValue : UInt64
609609
public init(rawValue: UInt64) { self.rawValue = rawValue }
610610

0 commit comments

Comments
 (0)