Update examples to use default main actor (#248) · structuredpath/sqlite-data@0c3d0ce · GitHub
Skip to content

Commit 0c3d0ce

Browse files
authored
Update examples to use default main actor (pointfreeco#248)
* Default main actor isolation in examples. * wip * wip * wip * wip * wip * convert more examples * wip * Update Package.swift
1 parent 652e9ce commit 0c3d0ce

21 files changed

Lines changed: 74 additions & 77 deletions

‎Examples/CaseStudies/Animations.swift‎

Lines changed: 1 addition & 1 deletion

‎Examples/CaseStudies/DynamicQuery.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct DynamicQueryDemo: SwiftUICaseStudy {
100100
}
101101

102102
@Table
103-
private struct Fact: Identifiable {
103+
nonisolated private struct Fact: Identifiable {
104104
let id: Int
105105
var body: String
106106
}

‎Examples/CaseStudies/ObservableModelDemo.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private class Model {
8787
}
8888

8989
@Table
90-
private struct Fact: Identifiable {
90+
nonisolated private struct Fact: Identifiable {
9191
let id: Int
9292
var body: String
9393
}

‎Examples/CaseStudies/SwiftDataTemplateDemo.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct SwiftDataTemplateView: SwiftUICaseStudy {
5656
}
5757

5858
@Table
59-
private struct Item: Identifiable {
59+
nonisolated private struct Item: Identifiable {
6060
let id: Int
6161
var timestamp: Date
6262
}

‎Examples/CaseStudies/SwiftUIDemo.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct SwiftUIDemo: SwiftUICaseStudy {
5656
}
5757

5858
@Table
59-
private struct Fact: Identifiable {
59+
nonisolated private struct Fact: Identifiable {
6060
let id: Int
6161
var body: String
6262
}

‎Examples/CaseStudies/TransactionDemo.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct TransactionDemo: SwiftUICaseStudy {
7171
}
7272

7373
@Table
74-
private struct Fact: Identifiable {
74+
nonisolated private struct Fact: Identifiable {
7575
static let databaseTableName = "facts"
7676
let id: Int
7777
var body: String

‎Examples/CaseStudies/UIKitDemo.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ final class UIKitCaseStudyViewController: UICollectionViewController, UIKitCaseS
107107
}
108108
}
109109

110-
enum Section: Hashable {
110+
nonisolated enum Section: Hashable {
111111
case facts
112112
}
113113
}
114114

115115
@Table
116-
private struct Fact: Hashable, Identifiable {
116+
nonisolated private struct Fact: Hashable, Identifiable {
117117
let id: Int
118118
var body: String
119119
}

‎Examples/CloudKitDemo/Schema.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import OSLog
33
import SQLiteData
44

55
@Table
6-
struct Counter: Identifiable {
6+
nonisolated struct Counter: Identifiable {
77
let id: UUID
88
var count = 0
99
}

‎Examples/Examples.xcodeproj/project.pbxproj‎

Lines changed: 7 additions & 3 deletions

‎Examples/Examples.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)