Skip to content

Commit

Permalink
Fix build in Swift 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Itaybre committed Feb 18, 2025
1 parent 6ad25a1 commit 0c85e76
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Example/Pow Example/ExampleList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,21 @@ struct ExampleList: View {
}
}

struct PresentInfoAction {
var action: (any Example.Type) -> ()
struct PresentInfoAction: Sendable {
var action: @MainActor (any Example.Type) -> ()

init(action: @escaping (any Example.Type) -> Void) {
init(action: @escaping @MainActor (any Example.Type) -> Void) {
self.action = action
}

func callAsFunction<T: Example>(_ type: T.Type) {
@MainActor func callAsFunction<T: Example>(_ type: T.Type) {
action(type)
}
}

extension EnvironmentValues {
struct PresentInfoActionKey: EnvironmentKey {
static var defaultValue: PresentInfoAction? = nil
struct PresentInfoActionKey: EnvironmentKey {
static let defaultValue: PresentInfoAction? = nil
}

var presentInfoAction: PresentInfoAction? {
Expand Down

0 comments on commit 0c85e76

Please sign in to comment.