Skip to content

Commit

Permalink
Improve formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller committed Mar 15, 2024
1 parent 80654f3 commit 3cc4f1a
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ public struct StateMachineHashableMacro: ExtensionMacro {
.map { "value\($0)" }
.joined(separator: ", ")
return """
case let .\(element.name.text)(\(associatedValues)):
return (\(associatedValues))
case let .\(element.name.text)(\(associatedValues)):
return (\(associatedValues))
"""
} else {
return """
case let .\(element.name.text)(value):
return (value)
case let .\(element.name.text)(value):
return (value)
"""
}
} else {
return """
case .\(element.name.text):
return ()
case .\(element.name.text):
return ()
"""
}
}
Expand All @@ -72,13 +72,13 @@ public struct StateMachineHashableMacro: ExtensionMacro {
var hashableIdentifier: HashableIdentifier {
switch self {
\(raw: hashableIdentifierCases.joined(separator: "\n"))
\(raw: hashableIdentifierCases.joined(separator: "\n"))
}
}
var associatedValue: Any {
switch self {
\(raw: associatedValueCases.joined(separator: "\n"))
\(raw: associatedValueCases.joined(separator: "\n"))
}
}
}
Expand Down

0 comments on commit 3cc4f1a

Please sign in to comment.