Skip to content

Commit 42b01f2

Browse files
authored
Fix some swiftdoc and small tidy (pointfreeco#2204)
* Remove double word and a little grammar gardening * Fix some swiftdoc parameters * Tidy params to '_' in DataManager
1 parent 861283f commit 42b01f2

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

Examples/Standups/Dependencies/DataManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ extension DataManager {
4242
}
4343

4444
static let failToWrite = Self(
45-
load: { url in Data() },
46-
save: { data, url in
45+
load: { _ in Data() },
46+
save: { _, _ in
4747
struct SaveError: Error {}
4848
throw SaveError()
4949
}
@@ -54,6 +54,6 @@ extension DataManager {
5454
struct LoadError: Error {}
5555
throw LoadError()
5656
},
57-
save: { newData, url in }
57+
save: { _, _ in }
5858
)
5959
}

Examples/Standups/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The inspiration for this application comes Apple's [Scrumdinger][scrumdinger] tu
1212
> that shows the time remaining in the meeting and creates a transcript that users can refer to
1313
> later.
1414
15-
The Scrumdinger app is one of Apple's most interesting code samples as it deals with many real world
15+
The Scrumdinger app is one of Apple's most interesting code samples as it deals with many real
1616
world problems that one faces in application development. It shows off many types of navigation,
1717
it deals with complex effects such as timers and speech recognition, and it persists application
1818
data to disk.
@@ -34,10 +34,10 @@ modern, best practices for SwiftUI development. We faithfully recreate the Scrum
3434
some key additions:
3535

3636
1. Identifiers are made type safe using our [Tagged library][tagged-gh]. This prevents us from
37-
writing non-sensical code, such as comparing a `Standup.ID` to a `Attendee.ID`.
37+
writing nonsensical code, such as comparing a `Standup.ID` to a `Attendee.ID`.
3838
2. Instead of using bare arrays in feature logic we use an "identified" array from our
3939
[IdentifiedCollections][identified-collections-gh] library. This allows you to read and modify
40-
elements of the collection via their ID rather than positional index, which can be error prone
40+
elements of the collection via their ID rather than positional index, which can be error-prone
4141
and lead to bugs or crashes.
4242
3. _All_ navigation is driven off of state, including sheets, drill-downs and alerts. This makes
4343
it possible to deep link into any screen of the app by just constructing a piece of state and
@@ -61,4 +61,4 @@ some key additions:
6161
[scrumdinger-dl]: https://docs-assets.developer.apple.com/published/1ea2eec121b90031e354288912a76357/TranscribingSpeechToText.zip
6262
[tagged-gh]: http://github.com/pointfreeco/swift-tagged
6363
[identified-collections-gh]: http://github.com/pointfreeco/swift-identified-collections
64-
[dependencies-gh]: http://github.com/pointfreeco/swift-dependencies
64+
[dependencies-gh]: http://github.com/pointfreeco/swift-dependencies

Sources/ComposableArchitecture/SwiftUI/ConfirmationDialog.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extension View {
7575
///
7676
/// - Parameters:
7777
/// - store: A store that describes if the dialog is shown or dismissed.
78-
/// - dismissal: An action to send when the dialog is dismissed through non-user actions, such
78+
/// - dismiss: An action to send when the dialog is dismissed through non-user actions, such
7979
/// as when a dialog is automatically dismissed by the system. Use this action to `nil` out
8080
/// the associated dialog state.
8181
@available(iOS 13, *)

Sources/ComposableArchitecture/TestStore.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@ public final class TestStore<State, Action, ScopedState, ScopedAction, Environme
684684
/// - Parameters:
685685
/// - initialState: The state the feature starts in.
686686
/// - reducer: The reducer that powers the runtime of the feature.
687+
/// - prepareDependencies: A closure that can be used to override dependencies that will be
688+
/// accessed during the test. These dependencies will be used when producing the initial
689+
/// state.
687690
@available(*, deprecated, message: "State must be equatable to perform assertions.")
688691
public init<R: ReducerProtocol>(
689692
initialState: @autoclosure () -> State,

Sources/ComposableArchitecture/ViewStore.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ extension ViewStore where ViewState: Equatable {
649649
/// - store: A store.
650650
/// - toViewState: A transformation of `ViewState` to the state that will be observed for
651651
/// changes.
652+
/// - fromViewAction: A transformation of `ViewAction` that describes what actions can be sent.
652653
public convenience init<State, Action>(
653654
_ store: Store<State, Action>,
654655
observe toViewState: @escaping (State) -> ViewState,

0 commit comments

Comments
 (0)