Skip to content

Commit 1eaa6fa

Browse files
stephencelisgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent b15c5bd commit 1eaa6fa

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

Sources/ComposableArchitecture/Observation/Store+Observation.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ extension SwiftUI.Bindable {
265265
@available(
266266
*,
267267
deprecated,
268-
message:
269-
"""
268+
message: """
270269
Use '$store.scope(state: \\.$destination, action: \\.destination)' (and optional trailing dot syntax '.sheet') instead. For alert or confirmation cases, additional work is needed. See the migration guide for more details: https://swiftpackageindex.com/pointfreeco/swift-composable-architecture/1.25.5/documentation/composablearchitecture/migratingto1.25#Enum-scopes
271270
"""
272271
)
@@ -397,8 +396,7 @@ extension Perception.Bindable {
397396
@available(
398397
*,
399398
deprecated,
400-
message:
401-
"""
399+
message: """
402400
Use '$store.scope(state: \\.$destination, action: \\.destination)' (and optional trailing dot syntax '.sheet') instead. For alert or confirmation cases, additional work is needed. See the migration guide for more details: https://swiftpackageindex.com/pointfreeco/swift-composable-architecture/1.25.5/documentation/composablearchitecture/migratingto1.25#Enum-scopes
403401
"""
404402
)
@@ -531,8 +529,7 @@ extension UIBindable {
531529
@available(
532530
*,
533531
deprecated,
534-
message:
535-
"""
532+
message: """
536533
Use '$store.scope(state: \\.$destination, action: \\.destination)' (and optional trailing dot syntax '.sheet') instead. For alert or confirmation cases, additional work is needed. See the migration guide for more details: https://swiftpackageindex.com/pointfreeco/swift-composable-architecture/1.25.5/documentation/composablearchitecture/migratingto1.25#Enum-scopes
537534
"""
538535
)

Sources/ComposableArchitectureMacros/ReducerMacro.swift

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ extension ReducerMacro: MemberMacro {
442442
}
443443

444444
private enum ReducerCase {
445-
case element(EnumCaseElementSyntax, attribute: Attribute? = nil, explicitActionType: TypeSyntax? = nil)
445+
case element(
446+
EnumCaseElementSyntax, attribute: Attribute? = nil, explicitActionType: TypeSyntax? = nil)
446447
indirect case ifConfig([IfConfig])
447448

448449
enum Attribute {
@@ -629,7 +630,8 @@ private enum ReducerCase {
629630
{
630631
let name = element.name.text
631632
let stateType = parameter.type
632-
return "case \(name)(ComposableArchitecture.Store<\(stateType.trimmed), \(explicitActionType.trimmed)>)"
633+
return
634+
"case \(name)(ComposableArchitecture.Store<\(stateType.trimmed), \(explicitActionType.trimmed)>)"
633635
} else {
634636
return "case \(element.trimmedDescription)"
635637
}
@@ -727,13 +729,14 @@ extension ReducerCase {
727729
}
728730
return self
729731
case .ifConfig(let configs):
730-
return .ifConfig(configs.map {
731-
IfConfig(
732-
poundKeyword: $0.poundKeyword,
733-
condition: $0.condition,
734-
cases: $0.cases.map { $0.resolvingExplicitActions(actionCases) }
735-
)
736-
})
732+
return .ifConfig(
733+
configs.map {
734+
IfConfig(
735+
poundKeyword: $0.poundKeyword,
736+
condition: $0.condition,
737+
cases: $0.cases.map { $0.resolvingExplicitActions(actionCases) }
738+
)
739+
})
737740
default:
738741
return self
739742
}

0 commit comments

Comments
 (0)