Skip to content

Commit

Permalink
🔧 fix: remove unnecessary checks for importing CoreGraphics on non-Da…
Browse files Browse the repository at this point in the history
…rwin systems
  • Loading branch information
Kyle-Ye committed Mar 10, 2024
1 parent 02d8ca4 commit 87f466c
Show file tree
Hide file tree
Showing 19 changed files with 0 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// Audited for RELEASE_2021
// Status: Complete

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

/// A type that you use to create custom alignment guides.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
// Status: Complete
// ID: E20796D15DD3D417699102559E024115

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

/// An alignment position along the horizontal axis.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
// Status: Complete
// ID: E20796D15DD3D417699102559E024115

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

/// An alignment position along the vertical axis.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// Audited for RELEASE_2021
// Status: Complete

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

/// A view's size and alignment guides in its own coordinate space.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// Audited for RELEASE_2021
// Status: Complete

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

/// The inset distances for the sides of a rectangle.
@frozen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

@frozen
public struct HStack<Content: View>: PrimitiveView {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

@frozen
public struct _HStackLayout {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// Audited for RELEASE_2021
// Status: WIP

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

// TODO:
struct LayoutComputer: Equatable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
// Status: TODO
// ID: 127A76D3C8081D0134153BE9AE746714

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

struct Spacing {
// TODO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// Audited for RELEASE_2021
// Status: Complete

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

struct _ProposedSize: Hashable {
var width: CGFloat?
Expand Down
4 changes: 0 additions & 4 deletions Sources/OpenSwiftUI/Test/_BenchmarkHost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
// Status: Complete
// ID: 3E629D505F0A70F29ACFC010AA42C6E0

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

#if canImport(QuartzCore)
import QuartzCore
Expand Down
4 changes: 0 additions & 4 deletions Sources/OpenSwiftUI/View/Animation/TODO/Animatable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ extension Animatable where AnimatableData == EmptyAnimatableData {
}
}

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

// MARK: - Animatable + CoreGraphics

Expand Down
4 changes: 0 additions & 4 deletions Sources/OpenSwiftUI/View/Animation/VectorArithmetic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ extension Double: VectorArithmetic {
}
}

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

extension CGFloat: VectorArithmetic {
@_transparent
Expand Down
4 changes: 0 additions & 4 deletions Sources/OpenSwiftUI/View/Core/IdentifiedViewProxy.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

public struct _IdentifiedViewProxy {
var identifier: AnyHashable
Expand Down
4 changes: 0 additions & 4 deletions Sources/OpenSwiftUI/View/Core/ViewTransform.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// ID: CE19A3CEA6B9730579C42CE4C3071E74

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

struct ViewTransform {
private var chunks: ContiguousArray<Chunk>
Expand Down
4 changes: 0 additions & 4 deletions Sources/OpenSwiftUI/View/Text/Font/TODO/Font.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

@frozen
public struct Font: Hashable {
Expand Down
4 changes: 0 additions & 4 deletions Sources/OpenSwiftUI/View/Text/Text/TODO/Text.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
// Audited for RELEASE_2021
// Status: Empty

#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

@frozen
public struct Text: Equatable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

@testable import OpenSwiftUI
import Testing
#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

struct AlignmentIDTests {
private struct TestAlignment: AlignmentID {
Expand Down
4 changes: 0 additions & 4 deletions Tests/OpenSwiftUITests/View/Core/Debug/ViewDebugTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

@testable import OpenSwiftUI
import Testing
#if canImport(Darwin)
import CoreGraphics
#else
import Foundation
#endif

struct ViewDebugTests {
@Test(.disabled("Skip the test until we finish the implementation of _ViewDebug"))
Expand Down

0 comments on commit 87f466c

Please sign in to comment.