Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis authored and github-actions[bot] committed Jan 30, 2024
1 parent 36e5420 commit 776bc5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ extension ObservableStateMacro: MemberMacro {

var declarations = [DeclSyntax]()

let access = declaration.modifiers.first { $0.name.tokenKind == .keyword(.public) || $0.name.tokenKind == .keyword(.package) }
let access = declaration.modifiers.first {
$0.name.tokenKind == .keyword(.public) || $0.name.tokenKind == .keyword(.package)
}
declaration.addIfNeeded(
ObservableStateMacro.registrarVariable(observableType), to: &declarations)
declaration.addIfNeeded(ObservableStateMacro.idVariable(access), to: &declarations)
Expand All @@ -267,7 +269,9 @@ extension ObservableStateMacro {
providingMembersOf declaration: Declaration,
in context: Context
) throws -> [DeclSyntax] {
let access = declaration.modifiers.first { $0.name.tokenKind == .keyword(.public) || $0.name.tokenKind == .keyword(.package) }
let access = declaration.modifiers.first {
$0.name.tokenKind == .keyword(.public) || $0.name.tokenKind == .keyword(.package)
}

let enumCaseDecls = declaration.memberBlock.members
.flatMap { $0.decl.as(EnumCaseDeclSyntax.self)?.elements ?? [] }
Expand Down
4 changes: 3 additions & 1 deletion Sources/ComposableArchitectureMacros/ViewActionMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ extension DeclGroupSyntax {
extension DeclModifierListSyntax {
fileprivate func bindingSpecifier() -> TokenSyntax {
guard
let modifier = first(where: { $0.name.tokenKind == .keyword(.public) || $0.name.tokenKind == .keyword(.package) })
let modifier = first(where: {
$0.name.tokenKind == .keyword(.public) || $0.name.tokenKind == .keyword(.package)
})
else { return "let" }
return "\(raw: modifier.name.text) let"
}
Expand Down

0 comments on commit 776bc5c

Please sign in to comment.