@@ -25,7 +25,7 @@ import UniformTypeIdentifiers
25
25
/// to eagerly serialize them, which is unnecessarily expensive if we know
26
26
/// they're actually concurrency-safe.
27
27
/// 2. We would have no place to store metadata such as the encoding quality
28
- /// (although in the future we may introduce a "metadata" associated type to
28
+ /// (although in the future we may introduce a "metadata" associated type to
29
29
/// `Attachable` that could store that info.)
30
30
/// 3. `Attachable` has a requirement with `Self` in non-parameter, non-return
31
31
/// position. As far as Swift is concerned, a non-final class cannot satisfy
@@ -48,14 +48,14 @@ import UniformTypeIdentifiers
48
48
///
49
49
/// - [`CGImage`](https://developer.apple.com/documentation/coregraphics/cgimage)
50
50
@_spi ( Experimental)
51
- public struct _AttachableImageContainer < ImageClass > : Sendable where ImageClass : AttachableAsCGImage {
51
+ public struct _AttachableImageContainer < Image > : Sendable where Image : AttachableAsCGImage {
52
52
/// The underlying image.
53
53
///
54
54
/// `CGImage` and `UIImage` are sendable, but `NSImage` is not. `NSImage`
55
55
/// instances can be created from closures that are run at rendering time.
56
56
/// The AppKit cross-import overlay is responsible for ensuring that any
57
57
/// instances of this type it creates hold "safe" `NSImage` instances.
58
- nonisolated ( unsafe) var image: ImageClass
58
+ nonisolated ( unsafe) var image: Image
59
59
60
60
/// The encoding quality to use when encoding the represented image.
61
61
public var encodingQuality : Float
@@ -77,7 +77,7 @@ public struct _AttachableImageContainer<ImageClass>: Sendable where ImageClass:
77
77
}
78
78
}
79
79
80
- init ( image: ImageClass , encodingQuality: Float ) {
80
+ init ( image: Image , encodingQuality: Float ) {
81
81
self . image = image. _makeCopyForAttachment ( )
82
82
self . encodingQuality = encodingQuality
83
83
}
@@ -106,7 +106,7 @@ extension UTType {
106
106
}
107
107
108
108
extension _AttachableImageContainer : AttachableContainer {
109
- public var attachableValue : ImageClass {
109
+ public var attachableValue : Image {
110
110
image
111
111
}
112
112
0 commit comments