Skip to content

Commit

Permalink
Fix LoadableState.map returning an optional (which is not needed)
Browse files Browse the repository at this point in the history
  • Loading branch information
SwiftedMind committed Nov 24, 2023
1 parent 21d3d1c commit 1942a18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Processed/Loadable/LoadableState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ extension LoadableState {
/// - Returns: A new `LoadableState` instance with the transformed value of type `T`,
/// or the same state if the current state is `absent`, `loading`, or `error`.
/// - Throws: Rethrows any error that the `transform` closure might throw.
public func map<T>(_ transform: (Value) throws -> T) rethrows -> LoadableState<T>? {
public func map<T>(_ transform: (Value) throws -> T) rethrows -> LoadableState<T> {
return switch self {
case .absent: .absent
case .loading: .loading
Expand Down

0 comments on commit 1942a18

Please sign in to comment.