mirror of
https://github.com/EmergeTools/Pow.git
synced 2026-03-25 08:55:50 +00:00
Fix build in Swift 6
This commit is contained in:
parent
6ad25a1266
commit
0c85e76f2f
1 changed files with 6 additions and 6 deletions
|
|
@ -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? {
|
||||
|
|
|
|||
Loading…
Reference in a new issue