Skip to content

Commit 1942a18

Browse files
committed
Fix LoadableState.map returning an optional (which is not needed)
1 parent 21d3d1c commit 1942a18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Processed/Loadable/LoadableState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ extension LoadableState {
138138
/// - Returns: A new `LoadableState` instance with the transformed value of type `T`,
139139
/// or the same state if the current state is `absent`, `loading`, or `error`.
140140
/// - Throws: Rethrows any error that the `transform` closure might throw.
141-
public func map<T>(_ transform: (Value) throws -> T) rethrows -> LoadableState<T>? {
141+
public func map<T>(_ transform: (Value) throws -> T) rethrows -> LoadableState<T> {
142142
return switch self {
143143
case .absent: .absent
144144
case .loading: .loading

0 commit comments

Comments
 (0)