Skip to content

Commit

Permalink
Enable StrictConcurrency and fix its emitted warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasf committed Jul 7, 2024
1 parent f146a7d commit b8bc566
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ let package = Package(
.product(name: "Collections", package: "swift-collections"),
.product(name: "Logging", package: "swift-log"),
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
.enableUpcomingFeature("ExistentialAny"),
.enableExperimentalFeature("StrictConcurrency")
]
),
.testTarget(
name: "Tests",
dependencies: ["SwiftSCAD"],
resources: [.copy("SCAD")],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
swiftSettings: [
.enableUpcomingFeature("ExistentialAny"),
.enableExperimentalFeature("StrictConcurrency")
]
)
]
)
2 changes: 1 addition & 1 deletion Sources/SwiftSCAD/Environment/EnvironmentTransform.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

public extension Environment {
static fileprivate var environmentKey: Environment.ValueKey = .init(rawValue: "SwiftSCAD.Transform")
static fileprivate let environmentKey: Environment.ValueKey = .init(rawValue: "SwiftSCAD.Transform")

/// Accesses the current affine transformation applied to this environment.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftSCAD/Environment/Facets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public extension Environment {
}
}

static internal var environmentKey: Environment.ValueKey = .init(rawValue: "SwiftSCAD.Facets")
static internal let environmentKey: Environment.ValueKey = .init(rawValue: "SwiftSCAD.Facets")
}

/// Accesses the current facets setting from the environment.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftSCAD/Shapes/2D/Text/Environment+Text.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal extension Environment {
var characterSpacing: Double?
}

static private var environmentKey: Environment.ValueKey = .init(rawValue: "SwiftSCAD.TextAttributes")
static private let environmentKey: Environment.ValueKey = .init(rawValue: "SwiftSCAD.TextAttributes")

var textAttributes: TextAttributes {
self[Self.environmentKey] as? TextAttributes ?? .init()
Expand Down

0 comments on commit b8bc566

Please sign in to comment.