Skip to content

Commit

Permalink
remove extra whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbrix committed Jan 3, 2025
1 parent ca978ef commit d2d6ea1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions swiftwinrt/Resources/Support/Array+FromAbi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ extension Array where Element: FromAbi {
public static func from(abi: WinRTArrayAbi<Element.ABI>) -> [Element] {
UnsafeBufferPointer(start: abi.start, count: Int(abi.count)).map { .from(abi: $0) }
}

}

@_spi(WinRTInternal)
extension Array where Element: Numeric {
public static func from(abi: WinRTArrayAbi<Element>) -> [Element] {
Array(UnsafeBufferPointer(start: abi.start, count: Int(abi.count)))
}

}

// RawRepresentable covers Enums, which are simply numberic types, but the where Element: Numeric doesn't
Expand All @@ -28,7 +26,6 @@ extension Array where Element: RawRepresentable, Element.RawValue: Numeric {
public static func from(abi: WinRTArrayAbi<Element>) -> [Element] {
Array(UnsafeBufferPointer(start: abi.start, count: Int(abi.count)))
}

}

@_spi(WinRTInternal)
Expand All @@ -43,5 +40,4 @@ extension Array {
public static func from<Bridge: AbiBridge>(abiBridge: Bridge.Type, abi: WinRTArrayAbi<UnsafeMutablePointer<Bridge.CABI>?>) -> [Element] where Element == Bridge.SwiftProjection?, Bridge.SwiftProjection: WinRTClass {
UnsafeBufferPointer(start: abi.1, count: Int(abi.0)).map { Bridge.from(abi: ComPtr($0)) }
}

}

0 comments on commit d2d6ea1

Please sign in to comment.