File tree Expand file tree Collapse file tree 2 files changed +32
-31
lines changed
Expand file tree Collapse file tree 2 files changed +32
-31
lines changed Original file line number Diff line number Diff line change 1- name : Format
2-
3- on :
4- push :
5- branches :
6- - main
7-
8- concurrency :
9- group : format-${{ github.ref }}
10- cancel-in-progress : true
11-
12- jobs :
13- swift_format :
14- name : swift-format
15- runs-on : macos-15
16- permissions :
17- contents : write
18- steps :
19- - uses : actions/checkout@v4
20- - name : Select Xcode 16.2
21- run : sudo xcode-select -s /Applications/Xcode_16.2.app
22- - name : Upgrade swift-format
23- run : brew update && brew install swift-format
24- - name : Format
25- run : make format
26- - uses : stefanzweifel/git-auto-commit-action@v5
27- with :
28- commit_message : Run swift-format
29- branch : ' main'
1+ # NB: swift-format produces invalid code in Xcode <16.3
2+ # Re-enable when GitHub Actions runners has Xcode 16.3 available.
3+ #
4+ # name: Format
5+ #
6+ # on:
7+ # push:
8+ # branches:
9+ # - main
10+ #
11+ # concurrency:
12+ # group: format-${{ github.ref }}
13+ # cancel-in-progress: true
14+ #
15+ # jobs:
16+ # swift_format:
17+ # name: swift-format
18+ # runs-on: macos-15
19+ # permissions:
20+ # contents: write
21+ # steps:
22+ # - uses: actions/checkout@v4
23+ # - name: Select Xcode 16.3
24+ # run: sudo xcode-select -s /Applications/Xcode_16.3.app
25+ # - name: Format
26+ # run: make format
27+ # - uses: stefanzweifel/git-auto-commit-action@v5
28+ # with:
29+ # commit_message: Run swift-format
30+ # branch: 'main'
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import Foundation
3131 extension Mutex where Value: ~ Copyable {
3232 /// Calls the given closure after acquiring the lock and then releases ownership.
3333 borrowing package func withLock< Result: ~ Copyable, E: Error > (
34- _ body: ( inout sendingValue ) throws ( E ) -> sending Result
34+ _ body: ( inout sending Value ) throws ( E ) -> sending Result
3535 ) throws ( E) -> sending Result {
3636 _lock. lock ( )
3737 defer { _lock. unlock ( ) }
@@ -40,7 +40,7 @@ import Foundation
4040
4141 /// Attempts to acquire the lock and then calls the given closure if successful.
4242 borrowing package func withLockIfAvailable< Result: ~ Copyable, E: Error > (
43- _ body: ( inout sendingValue ) throws ( E ) -> sending Result
43+ _ body: ( inout sending Value ) throws ( E ) -> sending Result
4444 ) throws ( E) -> sending Result? {
4545 guard _lock. try ( ) else { return nil }
4646 defer { _lock. unlock ( ) }
You can’t perform that action at this time.
0 commit comments