Skip to content

Commit 79623db

Browse files
stephencelisgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent 8e2f806 commit 79623db

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

Sources/CasePathsMacros/CasePathableMacro.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -425,14 +425,14 @@ final class SelfRewriter: SyntaxRewriter {
425425
}
426426

427427
extension StringProtocol {
428-
@inline(__always)
429-
func trimmingSuffix(while condition: (Element) throws -> Bool) rethrows -> Self.SubSequence {
430-
var view = self[...]
431-
432-
while let character = view.last, try condition(character) {
433-
view = view.dropLast()
434-
}
435-
436-
return view
428+
@inline(__always)
429+
func trimmingSuffix(while condition: (Element) throws -> Bool) rethrows -> Self.SubSequence {
430+
var view = self[...]
431+
432+
while let character = view.last, try condition(character) {
433+
view = view.dropLast()
437434
}
435+
436+
return view
437+
}
438438
}

Tests/CasePathsMacrosTests/CasePathableMacroTests.swift

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,9 @@ final class CasePathableMacroTests: XCTestCase {
721721
"""
722722
}
723723
}
724-
724+
725725
func testDocumentationIndentationTrimming() {
726-
assertMacro {
726+
assertMacro {
727727
"""
728728
@CasePathable
729729
enum Foo {
@@ -732,36 +732,36 @@ final class CasePathableMacroTests: XCTestCase {
732732
case bar
733733
}
734734
"""
735-
} expansion: {
736-
"""
737-
enum Foo {
738-
// baz
739-
// case foo
740-
case bar
735+
} expansion: {
736+
"""
737+
enum Foo {
738+
// baz
739+
// case foo
740+
case bar
741741
742-
public struct AllCasePaths {
743-
// baz
744-
// case foo
745-
public var bar: CasePaths.AnyCasePath<Foo, Void> {
746-
CasePaths.AnyCasePath<Foo, Void>(
747-
embed: {
748-
Foo.bar
749-
},
750-
extract: {
751-
guard case .bar = $0 else {
752-
return nil
753-
}
754-
return ()
742+
public struct AllCasePaths {
743+
// baz
744+
// case foo
745+
public var bar: CasePaths.AnyCasePath<Foo, Void> {
746+
CasePaths.AnyCasePath<Foo, Void>(
747+
embed: {
748+
Foo.bar
749+
},
750+
extract: {
751+
guard case .bar = $0 else {
752+
return nil
755753
}
756-
)
757-
}
754+
return ()
755+
}
756+
)
758757
}
759-
public static var allCasePaths: AllCasePaths { AllCasePaths() }
760758
}
759+
public static var allCasePaths: AllCasePaths { AllCasePaths() }
760+
}
761761
762-
extension Foo: CasePaths.CasePathable {
763-
}
764-
"""
762+
extension Foo: CasePaths.CasePathable {
765763
}
764+
"""
765+
}
766766
}
767767
}

0 commit comments

Comments
 (0)