Skip to content

Commit c4f53b3

Browse files
committed
.swift-format: Enable ReturnVoidInsteadOfEmptyTuple
1 parent e8c3dcf commit c4f53b3

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.swift-format

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"NoBlockComments": false,
1414
"OrderedImports": true,
1515
"UseLetInEveryBoundCaseVariable": false,
16-
"UseSynthesizedInitializer": false
16+
"UseSynthesizedInitializer": false,
17+
"ReturnVoidInsteadOfEmptyTuple": true,
1718
}
1819
}

Sources/SwiftParser/IncrementalParseTransition.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extension Parser {
4747
///
4848
/// This is also used for testing purposes to ensure incremental reparsing
4949
/// worked as expected.
50-
public typealias ReusedNodeCallback = (_ node: Syntax) -> ()
50+
public typealias ReusedNodeCallback = (_ node: Syntax) -> Void
5151

5252
/// Keeps track of a previously parsed syntax tree and the source edits that
5353
/// occurred since it was created.

Sources/SwiftSyntax/SourceLocation.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ fileprivate extension SyntaxText {
701701
/// - Returns: The position at the end of the walk.
702702
func forEachEndOfLine(
703703
position: AbsolutePosition,
704-
body: (AbsolutePosition) -> ()
704+
body: (AbsolutePosition) -> Void
705705
) -> AbsolutePosition {
706706
guard let startPtr = buffer.baseAddress else {
707707
return position
@@ -745,7 +745,7 @@ fileprivate extension RawTriviaPiece {
745745
/// - Returns: The position at the end of the walk.
746746
func forEachEndOfLine(
747747
position: AbsolutePosition,
748-
body: (AbsolutePosition) -> ()
748+
body: (AbsolutePosition) -> Void
749749
) -> AbsolutePosition {
750750
var position = position
751751
switch self {
@@ -788,7 +788,7 @@ fileprivate extension RawTriviaPieceBuffer {
788788
/// - Returns: The position at the end of the walk.
789789
func forEachEndOfLine(
790790
position: AbsolutePosition,
791-
body: (AbsolutePosition) -> ()
791+
body: (AbsolutePosition) -> Void
792792
) -> AbsolutePosition {
793793
var position = position
794794
for piece in self {
@@ -810,8 +810,8 @@ fileprivate extension RawSyntax {
810810
/// - Returns: The position at the end of the walk.
811811
func forEachEndOfLine(
812812
position: AbsolutePosition,
813-
body: (AbsolutePosition) -> (),
814-
handleSourceLocationDirective: (_ position: AbsolutePosition, _ rawSyntax: RawSyntax) -> ()
813+
body: (AbsolutePosition) -> Void,
814+
handleSourceLocationDirective: (_ position: AbsolutePosition, _ rawSyntax: RawSyntax) -> Void
815815
) -> AbsolutePosition {
816816
var position = position
817817
switch self.rawData.payload {

0 commit comments

Comments
 (0)