Skip to content

Commit 98a02af

Browse files
committed
Replace text async with keyword(.async)
1 parent 7591cf8 commit 98a02af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public struct AddCompletionHandlerMacro: PeerMacro {
3333
if funcDecl.signature.effectSpecifiers?.asyncSpecifier == nil {
3434
let newEffects: FunctionEffectSpecifiersSyntax
3535
if let existingEffects = funcDecl.signature.effectSpecifiers {
36-
newEffects = existingEffects.with(\.asyncSpecifier, "async ")
36+
newEffects = existingEffects.with(\.asyncSpecifier, .keyword(.async))
3737
} else {
38-
newEffects = FunctionEffectSpecifiersSyntax(asyncSpecifier: "async ")
38+
newEffects = FunctionEffectSpecifiersSyntax(asyncSpecifier: .keyword(.async))
3939
}
4040

4141
let newSignature = funcDecl.signature.with(\.effectSpecifiers, newEffects)

0 commit comments

Comments
 (0)