Skip to content

Commit 8b21c0a

Browse files
authored
Revert "Fix for newly optional return type of withDigits."
1 parent 8df2cb0 commit 8b21c0a

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Sources/SwiftFormatRules/GroupNumericLiterals.swift

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,11 @@ public final class GroupNumericLiterals: SyntaxFormatRule {
5959
}
6060

6161
newDigits = isNegative ? "-" + newDigits : newDigits
62-
guard
63-
let result = node.withDigits(
64-
SyntaxFactory.makeIntegerLiteral(
65-
newDigits,
66-
leadingTrivia: node.digits.leadingTrivia,
67-
trailingTrivia: node.digits.trailingTrivia))
68-
else {
69-
return ExprSyntax(node)
70-
}
62+
let result = node.withDigits(
63+
SyntaxFactory.makeIntegerLiteral(
64+
newDigits,
65+
leadingTrivia: node.digits.leadingTrivia,
66+
trailingTrivia: node.digits.trailingTrivia))
7167
return ExprSyntax(result)
7268
}
7369

0 commit comments

Comments
 (0)