Skip to content

Commit

Permalink
Remove local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller committed Mar 15, 2024
1 parent 992588b commit 80654f3
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,21 @@ public struct StateMachineHashableMacro: ExtensionMacro {
let associatedValues: String = (1...parameters.count)
.map { "value\($0)" }
.joined(separator: ", ")
let `case`: String = """
return """
case let .\(element.name.text)(\(associatedValues)):
return (\(associatedValues))
"""
return `case`
} else {
let `case`: String = """
return """
case let .\(element.name.text)(value):
return (value)
"""
return `case`
}
} else {
let `case`: String = """
return """
case .\(element.name.text):
return ()
"""
return `case`
}
}

Expand Down

0 comments on commit 80654f3

Please sign in to comment.