Skip to content

Commit d65f3c1

Browse files
stephencelisgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent 3e830b5 commit d65f3c1

File tree

4 files changed

+51
-54
lines changed

4 files changed

+51
-54
lines changed

Sources/ComposableArchitecture/Observation/NavigationStack+Observation.swift

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,12 @@ import SwiftUI
164164
.destination(
165165
self.store.scope(
166166
id: self.store.id(
167-
state: \.[
168-
id:component.id,
169-
fileID:_HashableStaticString(rawValue: fileID),
170-
filePath:_HashableStaticString(rawValue: filePath),
171-
line:line,
172-
column:column
173-
],
167+
state:
168+
\.[
169+
id:component.id,fileID:_HashableStaticString(
170+
rawValue: fileID),filePath:_HashableStaticString(
171+
rawValue: filePath),line:line,column:column
172+
],
174173
action: \.[id:component.id]
175174
),
176175
state: ToState {

Sources/ComposableArchitecture/Reducer/Reducers/StackReducer.swift

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -65,34 +65,34 @@ public struct StackState<Element> {
6565
}
6666
}
6767

68-
// subscript(
69-
// id id: StackElementID,
70-
// fileID fileID: HashableStaticString,
71-
// filePath filePath: HashableStaticString,
72-
// line line: UInt = #line,
73-
// column column: UInt = #column
74-
// ) -> Element? {
75-
// _read { yield self._dictionary[id] }
76-
// _modify { yield &self._dictionary[id] }
77-
// set {
78-
// switch (self.ids.contains(id), newValue, _XCTIsTesting) {
79-
// case (true, _, _), (false, .some, true):
80-
// self._dictionary[id] = newValue
81-
// case (false, .some, false):
82-
// if !_XCTIsTesting {
83-
// reportIssue(
84-
// "Can't assign element at missing ID.",
85-
// fileID: fileID.rawValue,
86-
// filePath: filePath.rawValue,
87-
// line: line,
88-
// column: column
89-
// )
90-
// }
91-
// case (false, .none, _):
92-
// break
93-
// }
94-
// }
95-
// }
68+
// subscript(
69+
// id id: StackElementID,
70+
// fileID fileID: HashableStaticString,
71+
// filePath filePath: HashableStaticString,
72+
// line line: UInt = #line,
73+
// column column: UInt = #column
74+
// ) -> Element? {
75+
// _read { yield self._dictionary[id] }
76+
// _modify { yield &self._dictionary[id] }
77+
// set {
78+
// switch (self.ids.contains(id), newValue, _XCTIsTesting) {
79+
// case (true, _, _), (false, .some, true):
80+
// self._dictionary[id] = newValue
81+
// case (false, .some, false):
82+
// if !_XCTIsTesting {
83+
// reportIssue(
84+
// "Can't assign element at missing ID.",
85+
// fileID: fileID.rawValue,
86+
// filePath: filePath.rawValue,
87+
// line: line,
88+
// column: column
89+
// )
90+
// }
91+
// case (false, .none, _):
92+
// break
93+
// }
94+
// }
95+
// }
9696

9797
/// Accesses the value associated with the given id and case for reading and writing.
9898
///

Sources/ComposableArchitecture/SwiftUI/NavigationStackStore.swift

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,12 @@ public struct NavigationStackStore<State, Action, Root: View, Destination: View>
5858
store
5959
.scope(
6060
id: store.id(
61-
state: \.[
62-
id:component.id,
63-
fileID:_HashableStaticString(rawValue: fileID),
64-
filePath:_HashableStaticString(rawValue: filePath),
65-
line:line,
66-
column:column
67-
]!,
61+
state:
62+
\.[
63+
id:component.id,fileID:_HashableStaticString(
64+
rawValue: fileID),filePath:_HashableStaticString(
65+
rawValue: filePath),line:line,column:column
66+
]!,
6867
action: \.[id:component.id]
6968
),
7069
state: ToState {
@@ -110,13 +109,12 @@ public struct NavigationStackStore<State, Action, Root: View, Destination: View>
110109
store
111110
.scope(
112111
id: store.id(
113-
state: \.[
114-
id:component.id,
115-
fileID:_HashableStaticString(rawValue: fileID),
116-
filePath:_HashableStaticString(rawValue: filePath),
117-
line:line,
118-
column:column
119-
]!,
112+
state:
113+
\.[
114+
id:component.id,fileID:_HashableStaticString(
115+
rawValue: fileID),filePath:_HashableStaticString(
116+
rawValue: filePath),line:line,column:column
117+
]!,
120118
action: \.[id:component.id]
121119
),
122120
state: ToState {

Sources/ComposableArchitecture/TestStore.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import Combine
33
import ConcurrencyExtras
44
import CustomDump
55
@_spi(Beta) import Dependencies
6-
import IssueReporting
76
import Foundation
7+
import IssueReporting
88

99
/// A testable runtime for a reducer.
1010
///
@@ -2451,10 +2451,10 @@ extension TestStore {
24512451
24522452
\(message)
24532453
""",
2454-
fileID: fileID,
2455-
filePath: filePath,
2456-
line: line,
2457-
column: column
2454+
fileID: fileID,
2455+
filePath: filePath,
2456+
line: line,
2457+
column: column
24582458
)
24592459
}
24602460
}

0 commit comments

Comments
 (0)