Skip to content

Commit

Permalink
Linter fixes (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
KazaiMazai authored Sep 10, 2024
1 parent 0ea7d79 commit 4bc8fe0
Show file tree
Hide file tree
Showing 18 changed files with 126 additions and 135 deletions.
5 changes: 2 additions & 3 deletions Sources/Puredux/SideEffects/AsyncAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ extension AsyncAction {
}
}


protocol AsyncActionsExecutor {
associatedtype Action
func executeAsyncAction(_ action: Action)

func executeAsyncAction(_ action: Action)
}
1 change: 0 additions & 1 deletion Sources/Puredux/SideEffects/Effect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,3 @@ private extension Effect {
perform = operation
}
}

26 changes: 13 additions & 13 deletions Sources/Puredux/SideEffects/EffectState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public extension Effect {
struct State: Codable, Equatable, Hashable {
/**A typealias for a universally unique identifier (`UUID`). */
typealias ID = UUID

/**The unique identifier for the `State` instance. */
private(set) var id = ID()

/** The internal state of the `Effect`. */
private var state = InternalState()
}
Expand All @@ -44,13 +44,13 @@ public extension Effect.State {
effect.run(maxAttempts: maxAttempts, delay: delay)
return effect
}

/**
Creates a new `Effect.State` instance in the idle state.

- Returns: A new `Effect.State` instance in an idle state.
*/

static func idle() -> Effect.State {
Effect.State()
}
Expand All @@ -67,7 +67,7 @@ public extension Effect.State {
var isInProgress: Bool {
status.isInProgress
}

/**
A property indicating whether the effect has completed successfully.

Expand All @@ -76,7 +76,7 @@ public extension Effect.State {
var isSuccess: Bool {
status.isSuccess
}

/**
A property indicating whether the effect has been cancelled.

Expand All @@ -85,7 +85,7 @@ public extension Effect.State {
var isCancelled: Bool {
status.isCancelled
}

/**
A property indicating whether the effect is idle.

Expand All @@ -94,7 +94,7 @@ public extension Effect.State {
var isIdle: Bool {
status.isIdle
}

/**
A property indicating whether the effect has failed.

Expand All @@ -103,7 +103,7 @@ public extension Effect.State {
var isFailed: Bool {
status.isFailed
}

/**
A property returning the associated error in case effect has failed.

Expand All @@ -112,7 +112,7 @@ public extension Effect.State {
var error: Error? {
state.error
}

/**
A property returning the current attempt number of the effect if it is in progress.

Expand All @@ -121,7 +121,7 @@ public extension Effect.State {
var currentAttempt: Int? {
state.currentAttempt?.attempt
}

/**
A property returning the delay for the current attempt of the effect if it is in progress.

Expand All @@ -130,7 +130,7 @@ public extension Effect.State {
var delay: TimeInterval? {
state.currentAttempt?.delay
}

/**
A property representing the current status of the effect.

Expand Down Expand Up @@ -419,7 +419,7 @@ extension Effect.State.InternalState {
var hasMoreAttempts: Bool {
attempt < lastAttempt
}

private var lastAttempt: Int {
maxAttempts - 1
}
Expand Down
Loading

0 comments on commit 4bc8fe0

Please sign in to comment.