Skip to content

Commit 0e0f162

Browse files
committed
Fix PR comments
1 parent ceab6d8 commit 0e0f162

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Sources/AppState/Application/Types/State/Application+State.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ extension Application {
9292
scope: Scope
9393
) {
9494
self.type = type
95-
self._value = initial()
96-
self.initial = initial()
95+
let initialValue = initial()
96+
self._value = initialValue
97+
self.initial = initialValue
9798
self.scope = scope
9899
}
99100

Tests/AppStateTests/AppStateTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ final class AppStateTests: XCTestCase {
9393
try await super.setUp()
9494

9595
await MainActor.run {
96-
// Reset all states to their initial values to ensure test isolation.
96+
// Reset all states to their initial values to ensure test isolation.
9797
Application.reset(\.username)
9898
Application.reset(\.customEnum)
9999
Application.reset(\.customStruct)
@@ -103,6 +103,7 @@ final class AppStateTests: XCTestCase {
103103
Application.reset(\.colors)
104104
Application.reset(\.isLoading)
105105

106+
// Ensure logging is enabled.
106107
Application.logging(isEnabled: true)
107108
}
108109
}

0 commit comments

Comments
 (0)