Skip to content

Commit a05fc94

Browse files
authored
Merge pull request #239 from dylansturg/revert-237-maybe_break_fix
Revert "Fix for newly optional return type of `withDigits`."
2 parents 8df2cb0 + 8b21c0a commit a05fc94

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)