Skip to content

Commit

Permalink
non-throwing -> throwing conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Jan 22, 2024
1 parent 77d2998 commit 5b3490c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/RangeState/HybridValueProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ extension HybridValueProvider {
asyncValue: { transform(await self.async($0)) }
)
}

/// Convert to a `HybridThrowingValueProvider`.
public var throwing: HybridThrowingValueProvider<Input, Output> {
.init(
syncValue: self.syncValueProvider,
asyncValue: self.asyncValueProvider
)
}
}

extension HybridThrowingValueProvider {
Expand Down

0 comments on commit 5b3490c

Please sign in to comment.