Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis authored and github-actions[bot] committed Jul 23, 2024
1 parent 3e830b5 commit d65f3c1
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,12 @@ import SwiftUI
.destination(
self.store.scope(
id: self.store.id(
state: \.[
id:component.id,
fileID:_HashableStaticString(rawValue: fileID),
filePath:_HashableStaticString(rawValue: filePath),
line:line,
column:column
],
state:
\.[
id:component.id,fileID:_HashableStaticString(
rawValue: fileID),filePath:_HashableStaticString(
rawValue: filePath),line:line,column:column
],
action: \.[id:component.id]
),
state: ToState {
Expand Down
56 changes: 28 additions & 28 deletions Sources/ComposableArchitecture/Reducer/Reducers/StackReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,34 +65,34 @@ public struct StackState<Element> {
}
}

// subscript(
// id id: StackElementID,
// fileID fileID: HashableStaticString,
// filePath filePath: HashableStaticString,
// line line: UInt = #line,
// column column: UInt = #column
// ) -> Element? {
// _read { yield self._dictionary[id] }
// _modify { yield &self._dictionary[id] }
// set {
// switch (self.ids.contains(id), newValue, _XCTIsTesting) {
// case (true, _, _), (false, .some, true):
// self._dictionary[id] = newValue
// case (false, .some, false):
// if !_XCTIsTesting {
// reportIssue(
// "Can't assign element at missing ID.",
// fileID: fileID.rawValue,
// filePath: filePath.rawValue,
// line: line,
// column: column
// )
// }
// case (false, .none, _):
// break
// }
// }
// }
// subscript(
// id id: StackElementID,
// fileID fileID: HashableStaticString,
// filePath filePath: HashableStaticString,
// line line: UInt = #line,
// column column: UInt = #column
// ) -> Element? {
// _read { yield self._dictionary[id] }
// _modify { yield &self._dictionary[id] }
// set {
// switch (self.ids.contains(id), newValue, _XCTIsTesting) {
// case (true, _, _), (false, .some, true):
// self._dictionary[id] = newValue
// case (false, .some, false):
// if !_XCTIsTesting {
// reportIssue(
// "Can't assign element at missing ID.",
// fileID: fileID.rawValue,
// filePath: filePath.rawValue,
// line: line,
// column: column
// )
// }
// case (false, .none, _):
// break
// }
// }
// }

/// Accesses the value associated with the given id and case for reading and writing.
///
Expand Down
26 changes: 12 additions & 14 deletions Sources/ComposableArchitecture/SwiftUI/NavigationStackStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@ public struct NavigationStackStore<State, Action, Root: View, Destination: View>
store
.scope(
id: store.id(
state: \.[
id:component.id,
fileID:_HashableStaticString(rawValue: fileID),
filePath:_HashableStaticString(rawValue: filePath),
line:line,
column:column
]!,
state:
\.[
id:component.id,fileID:_HashableStaticString(
rawValue: fileID),filePath:_HashableStaticString(
rawValue: filePath),line:line,column:column
]!,
action: \.[id:component.id]
),
state: ToState {
Expand Down Expand Up @@ -110,13 +109,12 @@ public struct NavigationStackStore<State, Action, Root: View, Destination: View>
store
.scope(
id: store.id(
state: \.[
id:component.id,
fileID:_HashableStaticString(rawValue: fileID),
filePath:_HashableStaticString(rawValue: filePath),
line:line,
column:column
]!,
state:
\.[
id:component.id,fileID:_HashableStaticString(
rawValue: fileID),filePath:_HashableStaticString(
rawValue: filePath),line:line,column:column
]!,
action: \.[id:component.id]
),
state: ToState {
Expand Down
10 changes: 5 additions & 5 deletions Sources/ComposableArchitecture/TestStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Combine
import ConcurrencyExtras
import CustomDump
@_spi(Beta) import Dependencies
import IssueReporting
import Foundation
import IssueReporting

/// A testable runtime for a reducer.
///
Expand Down Expand Up @@ -2451,10 +2451,10 @@ extension TestStore {
\(message)
""",
fileID: fileID,
filePath: filePath,
line: line,
column: column
fileID: fileID,
filePath: filePath,
line: line,
column: column
)
}
}
Expand Down

0 comments on commit d65f3c1

Please sign in to comment.