Skip to content

Commit b1c819c

Browse files
committed
Run format
1 parent 96b011c commit b1c819c

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

Examples/Github-App/Github-App/View/RepositoryView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct RepositoryView: View {
3333

3434
init(repository: Repository) {
3535
self.repository = repository
36-
self.store = Store(
36+
store = Store(
3737
reducer: RepositoryReducer(),
3838
initialReducerState: RepositoryReducer.ReducerState(url: repository.url)
3939
)

Examples/Github-App/Github-App/View/RootView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct RootReducer {
1818
}
1919

2020
enum CancelID {
21-
case fetchRequest
21+
case response
2222
}
2323

2424
@Dependency(\.repositoryClient.fetchRepositories) var fetchRepositories
@@ -33,8 +33,8 @@ struct RootReducer {
3333
} else {
3434
return .send(.queryChangeDebounced)
3535
.debounce(
36-
id: CancelID.fetchRequest,
37-
for: .seconds(0.3),
36+
id: CancelID.response,
37+
for: .seconds(0.3),
3838
clock: clock
3939
)
4040
}

Sources/SimplexArchitecture/SideEffect.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ public extension SideEffect {
129129
for duration: Duration,
130130
clock: any Clock<Duration>
131131
) -> Self {
132-
switch self.kind {
132+
switch kind {
133133
case .none, .debounce:
134134
self
135135
default:
136136
.init(
137137
effectKind: .debounce(
138-
base: self.kind,
138+
base: kind,
139139
id: AnyHashable(id),
140140
sleep: {
141141
try await clock.sleep(for: duration)

Sources/SimplexArchitecture/Store/Store+send.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ extension Store {
197197

198198
case let .debounce(base, id, sleep):
199199
cancellableTasks[id]?.cancel()
200-
let cancellableTask = Task.withEffectContext {
200+
let cancellableTask = Task.withEffectContext {
201201
try? await sleep()
202202
guard !Task.isCancelled else { return }
203203
await reduce(tasks: runEffect(base, send: send)).wait()

Sources/SimplexArchitectureMacrosPlugin/Reducer/ReducerMacro+memberMacro.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public struct ReducerMacro: MemberMacro {
7272
name: .identifier("Action"),
7373
inheritanceClause: InheritanceClauseSyntax {
7474
(viewAction.inheritanceClause?.inheritedTypes ?? []) +
75-
[InheritedTypeSyntax(type: TypeSyntax(stringLiteral: "ActionProtocol"))]
75+
[InheritedTypeSyntax(type: TypeSyntax(stringLiteral: "ActionProtocol"))]
7676
}
7777
) {
7878
MemberBlockItemListSyntax {
@@ -92,7 +92,7 @@ public struct ReducerMacro: MemberMacro {
9292
reducerActionToAction
9393
}
9494
}
95-
.formatted().cast(EnumDeclSyntax.self)
95+
.formatted().cast(EnumDeclSyntax.self)
9696
).formatted().cast(DeclSyntax.self),
9797
].compactMap { $0 }
9898
}
@@ -204,33 +204,33 @@ public struct ReducerMacro: MemberMacro {
204204
private static func changeAnyNestedDeclToTypealias(action: EnumDeclSyntax, reducerAccessModifier: String) -> EnumDeclSyntax {
205205
action.with(
206206
\.memberBlock,
207-
action.memberBlock.with(
207+
action.memberBlock.with(
208208
\.members,
209-
MemberBlockItemListSyntax(
209+
MemberBlockItemListSyntax(
210210
action.memberBlock.members.compactMap {
211211
if let name = $0.hasName?.name.text,
212212
!name.contains(action.name.text)
213213
{
214214
$0.with(
215215
\.decl,
216-
DeclSyntax(
216+
DeclSyntax(
217217
TypeAliasDeclSyntax(
218218
modifiers: .init(arrayLiteral: DeclModifierSyntax(name: .identifier(reducerAccessModifier))),
219219
name: .identifier(name),
220220
initializer: TypeInitializerClauseSyntax(
221221
value: IdentifierTypeSyntax(name: .identifier("\(action.name.text).\(name)"))
222222
)
223223
)
224-
)
224+
)
225225
)
226226
} else {
227227
$0
228228
}
229229
}
230-
)
231-
)
232-
.formatted()
233-
.cast(MemberBlockSyntax.self)
230+
)
231+
)
232+
.formatted()
233+
.cast(MemberBlockSyntax.self)
234234
)
235235
}
236236

0 commit comments

Comments
 (0)