From dcde72151de8a60eecaa1673ed3c3d110549069a Mon Sep 17 00:00:00 2001 From: stephencelis Date: Sat, 2 Dec 2023 16:24:30 +0000 Subject: [PATCH] Run swift-format --- Sources/ComposableArchitecture/Store.swift | 3 +-- .../ComposableArchitectureTests/StoreLifetimeTests.swift | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Sources/ComposableArchitecture/Store.swift b/Sources/ComposableArchitecture/Store.swift index ba15ee8194bc..d3d7ef31686b 100644 --- a/Sources/ComposableArchitecture/Store.swift +++ b/Sources/ComposableArchitecture/Store.swift @@ -1034,8 +1034,7 @@ extension ScopedStoreReducer: AnyScopedStoreReducer { removeDuplicates isDuplicate: ((ChildState, ChildState) -> Bool)? ) -> Store { let id = id?(store.stateSubject.value) - if - store.canCacheChildren, + if store.canCacheChildren, let id = id, let childStore = store.children[id] as? Store { diff --git a/Tests/ComposableArchitectureTests/StoreLifetimeTests.swift b/Tests/ComposableArchitectureTests/StoreLifetimeTests.swift index 5982e33b1686..335249d63792 100644 --- a/Tests/ComposableArchitectureTests/StoreLifetimeTests.swift +++ b/Tests/ComposableArchitectureTests/StoreLifetimeTests.swift @@ -1,5 +1,5 @@ -import XCTest import ComposableArchitecture +import XCTest @MainActor final class StoreLifetimeTests: BaseTCATestCase { @@ -47,7 +47,7 @@ final class StoreLifetimeTests: BaseTCATestCase { } @Reducer -fileprivate struct Child { +private struct Child { struct State: Equatable { var count = 0 } @@ -66,7 +66,7 @@ fileprivate struct Child { } @Reducer -fileprivate struct Parent { +private struct Parent { struct State: Equatable { var child = Child.State() } @@ -81,7 +81,7 @@ fileprivate struct Parent { } @Reducer -fileprivate struct Grandparent { +private struct Grandparent { struct State: Equatable { var child = Parent.State() }