Skip to content

Commit 277a6cf

Browse files
committed
Optimize Any.Type type
1 parent 16c3c2c commit 277a6cf

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Sources/OpenGraph/Runtime/Metadata.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ public func OGTypeApplyFields2(
2626
extension Metadata: Swift.Hashable, Swift.CustomStringConvertible {
2727
@inlinable
2828
@inline(__always)
29-
public init(_ type: Any.Type) {
29+
public init(_ type: any Any.Type) {
3030
self.init(rawValue: unsafeBitCast(type, to: UnsafePointer<_Metadata>.self))
3131
}
3232

3333
@inlinable
3434
@inline(__always)
35-
public var type: Any.Type {
35+
public var type: any Any.Type {
3636
unsafeBitCast(rawValue, to: Any.Type.self)
3737
}
3838

Sources/OpenGraph_SPI/Runtime/OGTypeID.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ void const* OGTypeGetDescriptor(OGTypeID typeID) {
141141
void const* OGTypeNominalDescriptor(OGTypeID typeID) {
142142
#ifdef OPENGRAPH_SWIFT_TOOLCHAIN_SUPPORTED
143143
auto metadata = reinterpret_cast<OG::swift::metadata const*>(typeID);
144-
145144
return metadata->nominal_descriptor();
146145
#else
147146
return nullptr;

0 commit comments

Comments
 (0)