Skip to content

Commit 341b551

Browse files
stephencelisgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent 9af8876 commit 341b551

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Sources/DependenciesMacrosPlugin/DependencyClientMacro.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public enum DependencyClientMacro: MemberAttributeMacro, MemberMacro {
2222
return []
2323
}
2424
// NB: Ideally `@DependencyEndpoint` would handle this for us, but there are compiler crashes
25-
if
26-
let initializer = binding.initializer,
25+
if let initializer = binding.initializer,
2726
try initializer.diagnose(node, context: context).earlyOut
2827
{
2928
return []

Sources/DependenciesMacrosPlugin/Support.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ extension InitializerClauseSyntax {
8181
Diagnostic(
8282
node: self.value,
8383
message: MacroExpansionErrorMessage(
84-
"""
85-
'@\(attribute.attributeName)' default must be closure literal
86-
"""
84+
"""
85+
'@\(attribute.attributeName)' default must be closure literal
86+
"""
8787
)
8888
)
8989
]
@@ -95,25 +95,25 @@ extension InitializerClauseSyntax {
9595
Diagnostic(
9696
node: self.value,
9797
message: MacroExpansionWarningMessage(
98-
"""
99-
Do not use 'unimplemented' with '@\(attribute.attributeName)'; it is a replacement and \
100-
implements the same runtime functionality as 'unimplemented' at compile time
101-
"""
98+
"""
99+
Do not use 'unimplemented' with '@\(attribute.attributeName)'; it is a replacement and \
100+
implements the same runtime functionality as 'unimplemented' at compile time
101+
"""
102102
)
103103
)
104104
)
105105
}
106106
throw DiagnosticsError(diagnostics: diagnostics)
107107
}
108-
108+
109109
guard
110110
closure.statements.count == 1,
111111
let statement = closure.statements.first,
112112
statement.item.description.hasPrefix("fatalError(")
113113
else {
114114
return DiagnosticAction(earlyOut: false)
115115
}
116-
116+
117117
context.diagnose(
118118
Diagnostic(
119119
node: statement.item,
@@ -154,7 +154,7 @@ extension InitializerClauseSyntax {
154154
)
155155
)
156156
)
157-
157+
158158
return DiagnosticAction(earlyOut: true)
159159
}
160160
}

0 commit comments

Comments
 (0)