Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Matejkob authored and github-actions[bot] committed Dec 30, 2023
1 parent bb042da commit 4fc1535
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Sources/SpyableMacro/Factories/ClosureFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ struct ClosureFactory {
let baseName = parameter.secondName ?? parameter.firstName

if parameter.isInoutParameter {
LabeledExprSyntax(expression: InOutExprSyntax(expression: DeclReferenceExprSyntax(baseName: baseName)))
LabeledExprSyntax(
expression: InOutExprSyntax(expression: DeclReferenceExprSyntax(baseName: baseName)))
} else {
LabeledExprSyntax(expression: DeclReferenceExprSyntax(baseName: baseName))
}
Expand Down Expand Up @@ -116,10 +117,11 @@ struct ClosureFactory {
}
}

private extension FunctionParameterListSyntax.Element {
var isInoutParameter: Bool {
extension FunctionParameterListSyntax.Element {
fileprivate var isInoutParameter: Bool {
if let attributedType = self.type.as(AttributedTypeSyntax.self),
attributedType.specifier?.text == TokenSyntax.keyword(.inout).text {
attributedType.specifier?.text == TokenSyntax.keyword(.inout).text
{
return true
} else {
return false
Expand Down

0 comments on commit 4fc1535

Please sign in to comment.